Controlling an Interactive Debugging Session

The following example shows how the debug perspective can appear after the program starts and calls back.

The debug perspective displays the following content:

Standard Debugging Operations

Session controls for standard debugging operations appear as options on the Run menu and icons on the toolbar. The main controls are

Continue executing until a breakpoint occurs or the program exits. You cannot see variables or registers until a breakpoint occurs. If the program is stopped while waiting for input, you must suspend its execution to examine its running state (variables, memory, registers, and so forth).

Go to the next executable statement, whether it is in the same subroutine or a different subroutine. The program "takes a step" of one executable line, as follows:

If the program is currently in a subroutine, finish executing the current subroutine and stop on the statement that called the subroutine. If the program is currently in the main program,  finish executing the program until it terminates. All breakpoints are honored.

Cause the program to exit and the debugging session to end.

Views for the Debugging Session

The following views of the debugging session are provided on tabs in the upper right pane:

Changing the Value of a Variable

To change the value of a variable in the program, do the following:

  1. Select the variable on the Variables view tab by clicking it.

    The value appears in the value pane at the bottom of the view.

  2. Edit the value in the value pane, as desired.

  3. Right-click the value pane and click Assign Value (alternatively, press Ctrl-S).

    The value of the variable is changed in the program.

Adding a Variable to the Watch List

To add variables to the watch list, do the following:

  1. Select the variable on the Variables view tab by clicking it.

  2. Right-click the pane and click Create with Expression.

    The variable is added to the watch list on the Expressions view tab.

Adding Variables to the Expression View

Use this feature to monitor the value of a selected variable during debug execution. To add variables to the Expression view, do the following:

Note: Ensure that you are in debug mode to add variables to the Expressions view.

  1. Select a variable in the symbol file.

  2. Right-click on the selected variable and click Add to watch view.

The selected variable is added to the Expressions view tab. You can view the value of the variable during program execution.