Adding, Editing, and Deleting Watch Expressions
See Also
A watch expression is an expression you define which Visual Basic then monitors for you. When your application enters break mode, the watch expressions you have selected appear in the Watch pane of the Debug window where you can observe their values. You can delete them once you are satisfied that the results are as you expect.
To add a watch expression
1. From the Debug menu, choose Add Watch.
2. Enter the expression you want evaluated in the Expression box.
3. Click an option button in the Context group to select the range for when the expression will be evaluated.
4. Click an option button in the Watch Type group to select how Visual Basic should respond to the watch expression.
5. Choose OK.
To edit a watch expression
1. From the Debug menu, choose Edit Watch (Ctrl+W).
2. Select the watch expression you want to edit from the Current Expressions list.
3. Choose Edit.
4. Make the changes you want to the expression, the context, and the watch type.
5. Choose OK.
To delete a watch expression
1. From the Debug menu, choose Edit Watch (Ctrl+W).
2. Select the watch expression you want to delete from the Current Expressions list, if you want to delete only one watch expression.
3. Click Delete to delete a single watch expression or click Delete All to delete all the current watch expressions.
Note Watch expressions are not saved when you save forms and modules. Closing a project or quitting Visual Basic automatically clears them.
Help:
Debugging Checklist
Setting and Clearing Breakpoints
Programmer's Guide:
Chapter 9, "Debugging"