Datasheet
Debug menu’s QuickWatch command described earlier, the new watch is placed in the Watch 1
window (shown in Figure 1-25). You can click and drag watches from one watch window to
another to make a copy of the watch in the second window. You can also click on the Name col-
umn in the empty line at the bottom of a watch window and enter an expression to watch. One
useful IDE trick is to drag watch windows 2, 3, and 4 onto Watch 1 so that they all become tabs
on the same window. Then you can easily use the tabs to group and examine four sets of watches.
❑ Autos — This command displays the Autos window shown in Figure 1-28. This window dis-
plays the values of local and global variables used in the current line of code and in the three
lines before and after it.
Figure 1-28: The Autos window displays the variables used
in the current code statement and the three statements
before and the three after.
❑ Locals — This command displays the Locals window shown in Figure 1-29. The Locals window
displays the values of variables defined in the local context. To change a value, click on it and
enter the new value. Click the plus and minus signs to the left of a value to expand or collapse
it. For example, the
Me entry shown in Figure 1-29 is an object with lots of properties that have
their own values. Click the plus sign to expand the object’s entry and view its properties. Those
properties may also be objects, so you may be able to expand them further.
Figure 1-29: The Locals window displays the values of variables
defined in the local context.
❑ Immediate — This command displays the Immediate window, where you can type and execute
ad hoc Visual Basic statements. The section “The Command and Immediate Windows” later in
this chapter describes this window in a bit more detail.
❑ Call Stack — This command displays the Call Stack window shown in Figure 1-30. This win-
dow lists the routines that have called other routines to reach the program’s current point of
28
Chapter 1
571982 ch01_2.qxd 1/19/06 1:15 PM Page 28