Changing the contents of a variable

About this task

To change the contents of a variable in the Monitors view:

Procedure

  1. Select the variable whose value you want to modify.
  2. If your variable is a struct or array, expand it to show its individual elements.
  3. Scroll down to the variable you want to change and do one of the following actions:
    • Double-click the variable or variable element.
    • Right-click the variable or variable element and choose Edit Value from the pop-up menu.
    Note: If you double-click on a variable and its value field cannot be edited, the variable is a type that cannot be modified (for example, constants and arrays).
  4. Enter a new value for the variable or variable element and press Enter or click away from the variable value field to submit the new value.
  5. To indicate that the variable value has changed, its indicator will have a delta symbol next to it. All variables affected by the change will also have a delta symbol next to their indicators.

Results

If the same variable is displayed in more than one monitor, the changes you make are reflected in all monitors. However, if two variables with the same name qualify to different programs or threads, they are considered to be two different variables. Therefore, a change to variable a in program 1 or thread 1 does not affect the value of variable a in program 2 or thread 2.


Feedback