### 13.5 Call Stack

Command: dbstack
Command: dbstack n
Command: dbstack -completenames
Built-in Function: [stack, idx] = dbstack (…)

  Display or return current debugging function stack information. With optional argument n, omit the n innermost stack frames.

  Although accepted, the argument -completenames is silently ignored. Octave always returns absolute file names. The arguments n and -completenames can be both specified in any order.

  The optional return argument stack is a struct array with the following fields:

  file

    The name of the m-file where the function code is located.

  name

    The name of the function with a breakpoint.

  line

    The line number of an active breakpoint.

  column

    The column number of the line where the breakpoint begins.

  scope

    Undocumented.

  context

    Undocumented.

  The return argument idx specifies which element of the stack struct array is currently active.

  See also: dbup, dbdown, dbwhere, dbstatus.

Built-in Function: dbup
Built-in Function: dbup (n)

  In debugging mode, move up the execution stack n frames. If n is omitted, move up one frame.

  See also: dbstack, dbdown.

Built-in Function: dbdown
Built-in Function: dbdown (n)

  In debugging mode, move down the execution stack n frames. If n is omitted, move down one frame.

  See also: dbstack, dbup.