dbstep
dbstep in
dbstep out
dbstep nlines
| Parameter | Description |
|---|---|
| nlines | Positive integer specifying the number of executable lines to step. Execution pauses at breakpoints encountered along the way. |
dbstep executes the next executable line of the current file during debugging, skipping breakpoints in functions called by that line.
dbstep in steps into any function called on the current line, pausing at the first executable line of the called function.
dbstep out completes execution of the current function and pauses just after returning to the caller. Execution pauses at any breakpoint encountered along the way.
dbstep nlines executes the specified number of lines, pausing at any breakpoint encountered.
These commands can only be used from the command line while debugging.
Outside a debug session, dbstep raises Debug commands only allowed when stopped in debug mode. When the step is typed at the K>> prompt, the console prints the line about to run, as 4 r = r * 2;; a step driven from the editor moves the arrow without printing it. At a stop on an uncaught error, dbstep ends the session.
function n = myfile(x)
n = myfunction(x-1);
end
function z = myfunction(y)
z = 2/y;
end
dbstop in myfile
myfile(2);
dbstep
dbstop in myfile
myfile(2);
dbstep in
dbstep out
dbstep 4
| Version | Description |
|---|---|
| 1.16.0 | initial version |
| 2.0.0 | uniform message outside a debug session, per-step echo of the line, ends the session at an error stop |