Watching an expression's value as you step

The Watches window in the integrated debugger provides a place to watch the value of any expression as you step through a program that you are debugging.

To open the Watches window, select Debug > Debugger from the Window menu.  On the toolbar, click the Watches button nidwatch.gif (1045 bytes).

The Watches window has two columns:  Expression and Value.  Before you start debugging a program, enter the expressions you want to evaluate in the Expression column (double click a field to edit it).  Then run the program.

Each time the debugger suspends execution, the expressions listed in the Watches window are evaluated and their values (or an error message if no value can be determined) are shown in the Value column.

By right-clicking on a particular row, you can do the following actions on an expression:

Click the Resume toolbar button resume.gif (1020 bytes) to resume running the program.

ngrelc.gif (533 bytes)
The integrated debugger

ngrelt.gif (466 bytes)
Debugging during the development cycle with the integrated debugger
Evaluating expressions in the integrated debugger
Modifying code while debugging
Inspecting and modifying variable values
Setting breakpoints for the integrated debugger in source code
Stepping through methods
Suspending, resuming, and terminating threads