dbdown
Move down the call stack in debug mode.
📝Syntax
dbdown
dbdown n
📥Input Arguments
Parameter Description
n positive integer scalar specifying the number of levels to move down on the call stack.
📄Description

dbdown changes the current workspace and function context to that of the called function or script while in debug mode. This command is the opposite ofdbup and can only be used after at least one call to dbup.

Each call to dbdown moves one level down the call stack, stopping at the workspace and function context where execution is paused. Execution can continue without returning to the paused line.

dbdown n is equivalent to executing dbdown n times.

This function can only be called from the command line while debugging.

💡Examples
Move between calling and called function workspaces while debugging.
function n = myfile(x)
  n = myfunc(x - 1);
end

function z = myfunc(y)
  z = 2 / y;
end

dbstop in myfile>myfunc
myfile(1)
whos
dbup
whos
dbdown
whos
Move down multiple levels on the call stack in one step.
dbdown 2
🔗See Also
dbupdbstackwhos
🕔Version History
Version Description
1.16.0 initial version
Edit this page on GitHub