Viewing the Call Stack for a Function

Home Page (Debugger)OverviewHow Do I... Topics

What do you want to do?

View the call stack for a function

Change the call stack display

To view the call stack for a function

  1. Place the insertion point in the function.

  2. On the Debug menu, click Run To Cursor to execute your program to the location of the insertion point.

    The Locals tab of the Variables window is updated automatically to display the local variables for the function or procedure.

  3. On the View menu, click Debug Windows, then click Call Stack.

    The calls are listed in the calling order, with the current function (the most deeply nested) at the top.

Tip   To run the program to the return address, select the function in the Call Stack window, and choose Run To Cursor from the Start Debug menu.

Tip   To set or remove a breakpoint at a function return address, select the function in the Call Stack window, and click the Insert/Remove Breakpoint toolbar button.

To change the call stack display

  1. On the Tools menu, click Options.

  2. Click the Debug tab.

  3. Under Call stack window, select the check boxes for Parameter Values or Parameter Types, according to the information you want to display.

Tip   The Context box at the top of the Variables window contains a drop-down list of call stack functions. If you select one of these functions, the debugger window views change accordingly.