d5/tengo

Debugging: Ability to set a breakpoint and trace?

gunnsth opened this issue · 1 comments

This is probably a feature request, but it would be nice if it was possible to do something like

tdb := import("tdb")
tdb.set_trace()

(similar to pdb in python), which would give a prompt, similar to the REPL prompt in the tengo CLI command and use to print state of variables and such.

There already is the OpSuspend instruction to suspend the run of the VM, but there's yet no way to continue after suspending. Perhaps that could be added to enable debugging?