Working with variables

Use the Locals pane to work with local variables during your debugging session. View global variables in the Monitors pane.

In the Locals pane, you can perform any of the following actions:

Note:

Usually, you work with variables in the Locals pane; however, you can also examine the contents of variables in the Source window. Unless otherwise specified, the following procedures assume that you are working in the Locals pane.

You can work with the PASE Debugger in a variety of ways: by right-clicking or double-clicking appropriate objects, by using a menu or a keyboard shortcut, or by using the tool bar (if the menu command has a tool icon). The following procedures specify only one way to select a command.

Changing variable values

To change the value of a variable, double-click the variable value and enter a new valid value.

Displaying contents of pointer memory locations

To display the contents of a pointer memory location, right-click the pointer variable and select Dereference. The contents appear in the hierarchy as a branch of the current variable.

To remove the contents of a pointer memory location from the display, right-click the pointer variable and select Reset.

Displaying contents of arrays and other variables

To display the contents of variables, such as arrays and structures, complete the following steps:

  1. Right-click the variable and select Set Array Bounds.
  2. Type the index of the lower bound and the upper bound.

    Tip: The default values for the bounds reflect the entire contents of the variable. So, to display all the contents of a variable, you do not need to change the values of the bounds.

  3. Click OK.

Canceling the display of pointer and array contents

To cancel displaying the Dereference or Set Array Bounds option for a variable, right-click the variable and select Reset.

Displaying memory associated with a variable

To display the memory that is associated with a variable, right-click the variable and select Go to Memory or New Memory Window.

Changing the display format for numeric variables

To turn on or turn off the option to display numeric variables in hexadecimal format, right click the Locals pane and select Format --> Hexadecimal.

Copying data to the clipboard

To copy all the data from the pane to the clipboard, right-click in the pane and select Copy Panel.

Suspending and resuming updates

To suspend updates to the pane, right-click in the pane and select Suspend Updates. To begin updating again, right-click in the pane and select Resume Updates.