Yes, I'm hoping that you won't really have to change code manually at all. But for now the idea is:
Run code normally
Ctrl-C breaks out of the currently running code, into the debug> prompt. Ctrl-C again would exit that and properly break out of the running code.
From there you use next/n, step/s, continue/c to go through your code, and print/p to evaluate an expression. So like text-mode GDB or node's debugger.
If you wanted to add a breakpoint, you'd add a debugger keyword in the IDE - however there's nothing to say the IDE couldn't do that automatically at some later stage. It could of course also have buttons for next/step/etc which mapped to sending the relevant commands over serial - I'm hoping someone else would do that bit ;)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes, I'm hoping that you won't really have to change code manually at all. But for now the idea is:
Ctrl-C
breaks out of the currently running code, into thedebug>
prompt.Ctrl-C
again would exit that and properly break out of the running code.next
/n
,step
/s
,continue
/c
to go through your code, andprint
/p
to evaluate an expression. So like text-mode GDB or node's debugger.If you wanted to add a breakpoint, you'd add a
debugger
keyword in the IDE - however there's nothing to say the IDE couldn't do that automatically at some later stage. It could of course also have buttons for next/step/etc which mapped to sending the relevant commands over serial - I'm hoping someone else would do that bit ;)