How to view call stack in MATLAB

Unlike most IDEs, MATLAB does not show the function call stack in a separate window.

  • To view the call stack, go to the Editor tab (at the top) and look for the Function Call Stack dropdown. It shows the names of the functions, but no line numbers. But choosing a call from the dropdown goes to the relevant line in the Editor window directly.

  • To view the call stack in the Command Window, use the command dbstack. This shows the stack with line numbers. The function call can be clicked to view the line in the Editor window.

Tried with: MATLAB R2014a and Ubuntu 14.04

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.