debugger
Breakpoints, pausing a script and resuming it. The editor's Debugger dock and the Debug Adapter Protocol server drive the same machinery.
Breakpoints, pausing a script and resuming it. The editor's Debugger dock and the Debug Adapter Protocol server drive the same machinery.
9 functions, 4 constants. Scripts reach it as debugger::.
Functions
Argument kinds are the script values a call passes: node is a node handle, any a table or value of any kind, fn a callback.
| function | acts on | what it does |
|---|---|---|
break_on_error() -> bool |
— | Whether a script that throws stops rather than being logged. |
breakpoints(string) -> [int] |
— | The lines one file's breakpoints landed on. |
request_break() |
— | Ask to stop at the next line any script runs; nothing is stopped yet when it returns. |
resume(str?) |
— | Let the stopped script go on, in the given step mode (CONTINUE, STEP_OVER, STEP_INTO, STEP_OUT). |
scope() -> Node |
— | The node whose subtree a pause holds still, or nil when a pause stops the whole tree. |
set_break_on_error(bool) |
— | Stop where a script throws instead of logging it and moving on; off by default. |
set_breakpoints(string, [int]) -> [int] |
— | Replace one file's breakpoints with the given lines, returning the lines they landed on. |
set_scope(Node?) |
— | Limit the pause to one node's subtree, so an editor keeps running while the game stops; nil means the whole tree. |
stop_location() -> debugger::Stop? |
— | Where a script is stopped, or nil while none is. A script hears each change with events::listen(this.node, "debugger_stopped"), as on_debugger_stopped(stop), rather than asking every frame. |
Constants
| name | value |
|---|---|
CONTINUE |
"continue" |
STEP_INTO |
"into" |
STEP_OUT |
"out" |
STEP_OVER |
"over" |