Creating a Watch

See Also 

A watch enables you to keep up to date about changes in the value of a variable or expression during program execution. The Watches window lists all of the watches you have defined for all of your IDE projects.

You can open the Watches window by choosing Window > Debugging > Watches (Alt-Shift-2).

You can create a watch during or outside of a debug session. The watch persists across multiple debug sessions and IDE sessions until you explicitly delete it.

To create a watch from the Source Editor:

  1. Select the variable or expression in the Source Editor and choose Debug > New Watch.

    The New Watch dialog box opens with the variable or expression entered in the Watch Expression text field.

  2. If a debug session is active, a fully qualified form of the expression is displayed in the Qualified Form field. If no qualified form can be produced for the expression, the field displays <parse error>.
  3. By default, the watch is created using the expression in the Watch Expression field. If you select the Use Qualified Form checkbox, the qualified form is used.
  4. Click OK.

    The Watches window opens with the new watch selected.

Notes:

See Also
Variables and Expressions
Evaluating an Expression

Legal Notices