Add a Watch Expression
A watch expression is an expression you define to be monitored in the Watch window. When your application enters break mode, the watch expressions you selected appear in the Watch window where you can observe their values.
To add a watch expression
On the Debug menu, click Add Watch. The Add Watch dialog box is displayed.
If an expression is already selected in the Code window, it is automatically displayed in the Expression box. If no expression is displayed, enter the expression you want to evaluate. The expression can be a variable, a property, a function call, or any other valid expression.
Select the narrowest scope that fits your needs. Selecting all procedures or all modules can slow down module execution considerably, since the expression is evaluated after execution of each statement. If you select a specific procedure for a context, execution is affected only while the procedure is in the list of active procedure calls. Choose Call Stack from the View menu to display the list of active procedures.
Select an option in the Watch Type group to define how the system responds to the watch expression.
To display the value of the watch expression, click Watch Expression.
To stop execution if the expression evaluates to True, click Break When Value is True.
To stop execution when the value of the expression changes, click Break When Value Changes.