Using the Call Stack

#### Search Results

Search

# Using the Call Stack

This document covers the following topics:

- About the Call Stack

- Displaying the Source Code of a Different Object

- Returning to the Object at the Current Trace Position

## About the Call Stack

The call stack window lists the objects which have been called during the current debugging session in hierarchical order.

The latest object is always shown at the top of the list. The variables window shows all variables which belong to this object by default. For example, when you step into a subprogram, this subprogram is shown at the top of the list and the variables window automatically shows the variables for this subprogram.

You can bring the editor window for a specific object to the front by double-clicking the corresponding entry in the call stack window.

Notes:

1. A gray arrow in the editor window indicates the position at which the previous object in the call stack hierarchy was invoked.
2. If copycode is debugged, the call stack does not contain an additional entry for this copycode.

## Displaying the Source Code of a Different Object

For each object listed in the call stack, you can display the source code and thus bring its editor window to the front. There are different commands for this purpose:

- Go To Source Code
  When you choose this command, the variables for the object in the activated editor window are not considered in the variables window. It still shows the variables of the previously called object.

- Switch To Call Level
  When you choose this command, the variables for the object in the activated editor window are shown in the variables window.

To go to the source code of a different object

- In the call stack, select the object for which you want to display the source code and from the context menu, choose Go To Source Code.

  The editor window for this object is activated.

To go to the source code of a different object and display the variables of this object

- In the call stack, select the object for which you want to display the source code and from the context menu, choose Switch To Call Level.

  The editor window for this object is activated. The content of the variables window changes; it now shows variables of this object.

## Returning to the Object at the Current Trace Position

When you have displayed the source code of a different object, you can return to the object at the current trace position (which is indicated by an arrow) and thus bring its editor window to the front.

To return to the object at the current trace position

- From the Debug menu, choose Show Trace Position.

  Note
  See also Trace Position in Editor Window.

  The editor window containing the current trace position is activated. The content of the variables window changes; it now shows the variables of this object.

### On this page

- About the Call Stack
- Displaying the Source Code of a Different Object
- Returning to the Object at the Current Trace Position