Editing or Deleting a Watch Expression

You can edit or delete any watch expression you select in the Watch pane of the Debug window. When you click Edit Watch on the Tools menu, the Edit Watch dialog box appears. This dialog box looks just like the Add Watch dialog box with a Delete button added.

To edit a watch expression

1. In the Watch pane of the Debug window, click the watch expression you want to edit.

2. On the Tools menu, click Edit Watch.

3. In the Edit Watch dialog box, make any changes you want to the expression, the scope for evaluating variables, or the watch type.

Tip

You can also edit any watch expression displayed in the Debug window by double-clicking the watch expression in the Watch pane. Visual Basic displays the selected watch expression in the Edit Watch dialog box.

To delete a watch expression

1. In the Watch pane of the Debug window, click the watch expression you want to delete.

2. On the Tools menu, click Edit Watch.

3. In the Edit Watch dialog box, click Delete.

Tip

If your keyboard has a DEL key, you can delete a watch expression by selecting it in the Watch pane of the Debug window and then pressing del.

Identifying Watch Types

To the left of each watch expression in the Watch pane of the Debug window is an icon that identifies the watch type of that expression. The following illustration shows the icons for the three watch types.