Viewing the Value of a Variable

To view the value of a variable or expression

  1. Wait for the debugger to stop at a breakpoint or watchpoint.

  2. On the Debug menu, click Quick Watch.

  3. Type or paste the variable or an expression into the Expression text box, and click Recalculate. The Expression values list displays name of the specified variable or expression and its values for the processes specified in the network filter of the Watch window. If you want to add this variable or expression to the Watch window, click Add Watch.

  4. Click Close.

To view the value of a variable or expression in the Watch window

  1. Wait for the debugger to stop at a breakpoint or watchpoint.

  2. On the View menu, click Debug Windows, then click Watch.

  3. Type or paste the variable or an expression into the Name column on the pane of the Watch window. Press ENTER (of typing). The Watch window evaluates the variable or expression immediately and displays the value or an error message. The window is only updated when the debugger stops at a breakpoint or watchpoint. Along with the typed variables the Watch window displays the variables specified in the Expressions tab of the Debug object manager dialog.

If you add an array or object variable to the Watch window, plus sign (+) or minus sign () boxes appear in the Name column. Use these boxes to expand or collapse your view of the variable described in Spreadsheet Fields.

By default the Watch window displays values for all processes of the debugged program. You can set a network filter for this window and watch values only on the processes corresponding to the virtual processors specified in the network filter (see Setting network filter).

If you change the current call stack position for a process that satisfies the network filter condition for the Watch window, then all values in the column displaying values for this process are colored in red.

See also:

Watch window

Quick Watch window

Setting network filter

Spreadsheet Fields