MATLAB Function Reference
  Go to function:
    Search    Help Desk 
dbstack    Examples   See Also

Display function call stack

Syntax

Description

dbstack displays the line numbers and M-file names of the function calls that led to the current breakpoint, listed in the order in which they were executed. In other words, the line number of the most recently executed function call (at which the current breakpoint occurred) is listed first, followed by its calling function, which is followed by its calling function, and so on, until the topmost M-file function is reached.

[ST,I] = dbstack returns the stack trace information in an m-by-1 structure ST with the fields:

name function name

line function line number

The current workspace index is returned in I.

Examples

See Also

dbclear     Clear breakpoints

dbcont      Resume execution

dbdown      Change local workspace context (down)

dbquit      Quit debug mode

dbstatus    List all breakpoints

dbstep      Execute one or more lines from a breakpoint

dbstop      Set breakpoints in an M-file function

dbtype      List M-file with line numbers

dbup        Change local workspace context (up)



[ Previous | Help Desk | Next ]