Watch Tab

The Watch tab allows you to add expressions that will be evaluated whenever the debugger is paused and after each debugger step. With the watch tab, you can place local variables and fields that you are interested in observing in a separate pane.

Watch expressions are evaluated in the context of the current stack frame. If a watch expression cannot be evaluated the Value and Type columns will be blank.

When a debug session ends, all current watch expressions will be saved with the project so that next time you start a debug session these watch expression will be restored unless you have disabled the Remember watches option in Tools | Options | Debug category.

Except for the ability to add, remove, and modify expressions to be evaluated, the Watch tab behaves and looks identical to the Variables Tab so details on how information in the Watch tab are displayed will not be repeated here. Please consult the Variables Tab documentation for more details.

Adding new watch expressions

To add a new expression to watch, right-click anywhere in the Watch tab and select Add Watch. A dialog will be displayed, prompting you to enter an expression.

Shortcut: hitting Insert key when Watch table has focus will display the new expression dialog.

Another way to add new watch expressions is to right-click on a variable node and select Add to Watch from the popup menu. This is probably the easiest way to add new watch expressions.

Removing watch expressions

To remove a watch expression, right-click on the expression you want to remove and select Remove Watch. To remove all watches, right click anywhere in the watch tab and select Remove All.

Shortcut: pressing Delete key will remove the selected watch expression(s).

Editing watch expressions

To make modifications to an existing watch expression, right-click on the expression you wish to modify and select Edit Watch from the popup menu.