Watches
The Watches tab lists all currently set watches. A watch is a node you can create in the Debugger Window to display the current value of any variable of that name currently in scope. You can monitor the value of the variable as it changes during the execution of the program.
![]()
To set a watch:
- Choose Add Watch from either
- The Debug menu on the Main Window.
- The contextual menu of the root
Watches
item on the Watches tab of the Debugger Window.- From the contextual menu of a variable you have selected in the Editor (double-click the variable to select it, and then right-click to bring up the context menu).
A dialog box requesting the name of the variable to watch will open. Once you have entered the name of a variable in your source and clicked OK, it will be listed in the
Watches
tree.- Click on this item in the
Watches
tree to select it and display its property sheet.- Continue running the application and watch the variable change.
Fixed watches
Whereas a standard watch refers to the value of variable of that name currently in scope, it is possible to create a fixed watch, which always refers to the variable itself that it was created on.
To add a fixed watch:
- Right-click on the watch and choose Create Fixed Watch from the contextual menu.
A new node will appear in the Watches tree showing the value of that specific variable. If the context changes, and the new context contains a different variable of the same name, the watch will show the value of the variable currently in scope, and the fixed watch will show the value of the particular variable it was created on.
![]()
Contents | Prev | Next | Index |