Using the watch windowOne way to view the value of variables is with the Watch window. This window will show
you the expression you are watching, the value of the expression, the type of watch, and
the procedure where the expression is being evaluated. Using the Watch window allows you
to look at only the variables or expressions which interest you. You can access the Watch
window from the Debug toolbar or by selecting the Watc To set up a variable or expression for viewing, you have to add it to the Watch window.
To do this, you choose the The Add Watch dialog also allows you to specify where you want to observe the variable. These context settings let you observe the value of the variable during the entire program or just during a specific procedure. The Watch Type options let you decide whether to just look at the value of the variable or to break (pause the execution of the code) when a specific condition exists. You can choose to have the program pause every time a variable changes or when the watch expression is True. This way you can determine when a variable reaches or exceeds a specific value. To use this type of watch, the expression must be a Boolean variable or a logical expression. If at a later time, you wish to edit the watch expression, you can right-click the
mouse in the Watch window and select the |
|
![]() |
![]() |
|||