The New Watch dialog box lets you specify variables or expressions 
to watch continuously when debugging an application. You open this 
dialog box by choosing Debug > New Watch, right-clicking a 
variable in the Source Editor and choosing New Watch, or 
clicking the New Watch button  in 
the Variables window. When you open 
the dialog box from the Source Editor, the Watch Expression field 
contains the name of the variable that the insertion point is on.
  in 
the Variables window. When you open 
the dialog box from the Source Editor, the Watch Expression field 
contains the name of the variable that the insertion point is on.
When you specify an expression to watch, follow the syntax rules of the debugger that you are using, which by default is the gdb debugger.
When you create a watch, the value of the variable or expression is immediately evaluated and displayed in the Watches window. The value is based on the current context. When you change the current context, the Watches window is updated to show the value of the watch for that context.
| See Also | |
|---|---|
| Stepping Through Your C or C++ Program | |