Skip to content

debug

help · scripts/help/debug.m

: debug ()

Quick index of the interactive debugger commands.

Run help CMD against any entry below for its full description and options.

Nexus offers the following debugging commands:

dbstop

Set a breakpoint.

dbclear

Delete a breakpoint.

dbstatus

Show every breakpoint currently set.

dbwhere

Print the file and line number at the current stop point.

dbtype

Show a debugged function’s source, with each line numbered.

dblist

Show a 10-line window of source centered on the current stop point.

dbstep
dbnext

Advance execution by one or more statements, step into a called function, or run to the end of the current function, returning to the debug prompt afterward.

dbcont

Resume ordinary execution from the debug prompt.

dbquit

Leave debug mode right away and return to the top-level prompt.

dbstack

Show the current call stack.

dbup

Move one frame up the call stack.

dbdown

Move one frame down the call stack.

keyboard

Drop into debug mode from within a running m-file.

debug_on_error

Control whether an error drops Nexus into debug mode.

debug_on_warning

Control whether a warning drops Nexus into debug mode.

debug_on_interrupt

Control whether an interrupt drops Nexus into debug mode.

isdebugmode

Query whether the interpreter is currently in debug mode.

On hitting a breakpoint (or any other trigger for debug mode), the prompt switches to "K>>", giving access to the workspace of the stopped function; any Nexus command valid in that context can be typed there.