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:

CommandEffect
s, stepRun the next line (steps into function calls)
c, continueContinue until the next breakpoint
b <line>Add a breakpoint
rb <line>Remove a breakpoint
p <var>Print a variable's value and type
vars, localsPrint all local variables in the current scope
bt, backtrace, stackPrint the call stack
l, listShow more source context around the current line
h, help, ?Show this list
q, quit, exitStop the program

Edit this page on GitHub