The Watch window, which only can be viewed in Break mode, permits you to view the values of variables and expressions. The Watch window in Figure D.3 shows the values of one variable and two expressions. If you don't see a Watch window when you enter Break mode, hover the cursor over Windows in the Debug menu, and then click on Watch. Figure D.3. A typical Watch window.
Although you can type directly into the Watch window, the easiest way to add an expression to the window is to right-click on a variable in the Code window and then click on "Add Watch" in the context menu. You can then alter the expression in the Name column of the Watch window. To delete an expression from the Watch window, right-click on the expression and then click on "Delete Watch." Also, you can directly alter the value of any variable in the Watch window and have the values of the other expressions change accordingly. |