Skip to content

Commit b00d90b

Browse files
committed
Added ~dump and ~strdump debug primitives description
1 parent 506ea8b commit b00d90b

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docs/develop/func/stdlib.mdx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,23 @@ A variant of `parse_std_addr` that returns the (rewritten) address as a slice `s
650650

651651
## Debug primitives
652652

653-
Currently, only one function is available.
653+
Debug primitives can be used for inspecting state of various variables while running tests or console scripts.
654+
655+
#### ~dump
656+
657+
```func
658+
forall X -> () ~dump(X value) impure asm "s0 DUMP";
659+
```
660+
661+
Outputs a value.
662+
663+
#### ~strdump
664+
665+
```func
666+
() ~strdump(slice str) impure asm "STRDUMP";
667+
```
668+
669+
Dumps a string. Slice parameter bit length must be divisible by 8.
654670

655671
#### dump_stack
656672

0 commit comments

Comments
 (0)