Adding a variable, expression, or register to the Monitors view

The Monitors view shows variables, expressions, and registers that you have selected to monitor. You can enter the variables or expressions in a dialog box or select them from the Debugger Editor. Use the Monitors view to monitor global variables - or variables, expressions, and registers that you want to see at all times during your debugging session. From the Monitors view, you can also modify the content of variables, expressions, or registers - or change the representation of values.

About this task

Note: The expression support for some programming languages may depend upon the version of the compiler and/or runtime for those languages which are installed on your server.

To add a new Program Monitor for an expression from the Monitors view:

Procedure

  1. In the editor, select the source line that represents the context in which you want to evaluate the expression.
  2. Click the Monitors view Monitor Expression button (Monitor Expression button).
  3. In the Monitor Expression dialog box, enter the variable, expression, or register in the field.
  4. Click OK.

Results

To add a new Program Monitor for a variable or expression from the editor:

  1. In the editor, highlight and right-click the expression that you want to monitor.
  2. Select Monitor Expression from the pop-up menu.

To add a new Program Monitor for a variable or expression from the Variables view:

  1. In the Variables view, right-click the variable that you want to monitor.
  2. Select Monitor Local Variable from the pop-up menu.

To add multiple monitors from the Variables view, select multiple variables using the keyboard Ctrl or Shift keys, and then follow the above steps.

To add a new Program Monitor for a register from the Registers view:

  1. In the Registers view, right-click the register that you want to monitor.
  2. Select Monitor Register from the pop-up menu.

To change the contents of a variable, expression, or register in the Monitors view:

  1. Select the expression whose value you want to modify.
  2. If the expression is a struct or array, expand it to show its individual elements.
  3. Scroll down to the expression you want to change and do one of the following:
    • Double-click the expression.
    • Right-click the expression and choose Change 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.
  4. Enter a new value for the expression and press Enter. The new value can be any valid expression that has no side effects.
  5. To indicate that the expression value has changed, its indicator will have a delta symbol next to it. All expressions affected by the change will also have a delta symbol next to their indicators.

Feedback