-
Notifications
You must be signed in to change notification settings - Fork 0
Debugger
Axel Faes edited this page Sep 13, 2015
·
2 revisions
When the engine is in debug mode: a script that is run will immediately stop to ask what it should do.
The given actions are:
-
c
to continue running -
s
to step into -
n
to move to the next step -
o
to step out of the current function or fiber -
b
to set a breakpoint- give the line number on which to place a breakpoint
-
l
to list items-
b
to list all breakpoints -
v
to list all local variables -
m
to list all member properties from the current object -
g
to list all global variables -
s
to list statistics from the VM (GC + host objects) -
f
to print the current stack
-
-
r
to remove a breakpoint -
w
to check where you are -
a
to abort execution -
h
to print the help menu
There is no exposing API that makes it possible to design an debugger without knowing/using any of the internals of the VM.
DebugState
is an enum holding the current state of the debugger
- CONTINUE: continue until next break point
- STEP_INTO: stop at next instruction
- STEP_OVER: stop at next instruction, skipping called functions
- STEP_OUT: run until returning from current function
- DEFAULT