Prev Next

View the Call Stack

The Call Stack window is used to display all currently running threads in a process. It can be used to identify which thread is operational, immediately before program failure occurs.

When a Simulation is active, the Call Stack will show the current execution context for the running simulation. This will include a separate context stack for each concurrent simulation "thread".

A stack trace is displayed whenever a thread is suspended, through one of the step actions or through encountering a breakpoint. The Call Stack window can record a history of stack changes, and enables you to generate Sequence diagrams from this history.

Access

Ribbon

Execute > Windows > Call Stack

Other

Execution Analyzer window toolbar : | Call Stack

Use to

  • View stack history to understand the execution of a process
  • View threads
  • Save a call stack for later use
  • Record call stack changes for Sequence diagram generation
  • Generate a Sequence diagram from the call stack
  • View the related code line in the Source Code Editor

Facilities

Facility

Description

See also

Indicators

  • A pink arrow highlights the current stack frame
  • A blue arrow indicates a thread that is running
  • A red arrow indicates a thread for which a stack trace history is being recorded

Save a Call Stack to a .TXT File

Not currently available.

Record a Thread in a Debug Session

To record the execution of a thread and direct the recording to the Record & Analyze window, right-click on the thread in the Call Stack and select the appropriate context menu option:

  • 'Record' - to manually record the current thread during the debug session
    Used in conjunction with the 'step' buttons of the debugger; each function that is called due to a step command is logged to the Record & Analyze window
  • 'Auto-Record' - to perform auto-recording during a debug session
    When you select this icon, the Analyzer begins recording and does not stop until either the program ends, you stop the debugger or you click on the 'Stop' icon
The Recording History

Stop Recording

If you have started a manual or automatic recording of a thread you can stop it before completion; select the thread (indicated by a red arrow) and  either:

  • Click on the (Stop Recording) button in the toolbar or
  • Right-click and select the 'Stop' option

Generate a Sequence Diagram from the Call Stack

To generate Sequence diagram from the Call Stack trace, either:

  • Click on the (Generate Sequence Diagram of Stack) button, or
  • Right-click and select the 'Generate Sequence Diagram' option
Create Sequence Diagram of Call Stack

Copy Stack to Recording History

To add the stack details immediately to the Record & Analyze window (for later generation of Sequence diagrams) either:

  • Click on the button, or
  • Right-click and select the 'Copy Stack to Record History' option
The Recording History

Toggle Stack Depth

To toggle between showing the full stack and showing only frames with source, click on the (Toggle Stack Depth) button.

Display Related Code in Source Code Editor

Double-click on a thread/frame to display the related line of code in the Source Code Editor; local variables are also refreshed for the selected frame.

Editing Source Code

Learn more