Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Watch Window

Visual Studio .NET 2003

To open the Watch window, the debugger must be running or in break mode. From the Debug menu, choose Windows, then Watch, and click on Watch1, Watch2, Watch3, or Watch4.

You can use the Watch window to evaluate variables and expressions and keep the results. You can also use the Watch window to edit the value of a variable or register. For more information, see Editing a Value in the Watch Window.

In this column you can type any valid expression recognized by the debugger. For more information, see Expressions in the Debugger.
The debugger evaluates the expression displayed in the Name column and places the result in this column. If the expression is a variable or register name, you can edit the value in this column to change the contents of the variable or register. You cannot edit the value of const variables. You can edit and display register values for native-code applications only.

You can change the numeric format of the value to hexadecimal in the General, Debugging, Options dialog box or by right-clicking the Watch window and choosing the Hexadecimal Display option from the shortcut menu.

This column displays the data type of the variable or expression.

See Also

Using the Watch Window | Expressions in the Debugger | Command Window | Visual Studio Debugger Model

© 2015 Microsoft