The debugger
Start a script with --debug (or --break=<line>) to drop into an interactive step-debugger the moment execution reaches a breakpoint (or from the very first statement, with --debug alone):
ton618 script.ton --debug
ton618 script.ton --break=12 --break=20
Commands at the (ton618-dbg) prompt:
| Command | Effect |
|---|---|
s, step | Run the next line (steps into function calls) |
c, continue | Continue until the next breakpoint |
b <line> | Add a breakpoint |
rb <line> | Remove a breakpoint |
p <var> | Print a variable's value and type |
vars, locals | Print all local variables in the current scope |
bt, backtrace, stack | Print the call stack |
l, list | Show more source context around the current line |
h, help, ? | Show this list |
q, quit, exit | Stop the program |