Using the Watch Window

The Watch window evaluates a list of expressions when the debugger is stopped at a breakpoint. You can use the Watch window to display values of variables, properties, or simple expressions such as Hex(Err.Number).

The scope of the variables in the Watch window is the same as the scope of the selected procedure in the CallStack window.

    To display the contents of a variable in the Watch window

  1. Select the first empty space in the name column.
  2. Enter the name of the variable.

    You also can evaluate a variable and add it to the Watch window by using the Quick Watch dialog box. To open the Quick Watch dialog box, press the QuickWatch button on the toolbar. After you add a variable to the Watch window, you can step through code to watch the value change.

    To delete a variable from the Watch window

  1. Select the name of the variable.
  2. Delete the name of the variable and press ENTER.

Note If an expression in the Watch window generates an error, the application's Err object is loaded with information about the error. The change in the Err object may overwrite other error information the application needs for proper execution.