Chapter 6: Debugging with Visual Studio

161

Figure 6-9 The Autos window

list can be quite long, depending on how many variables are in scope. You would want to use the Locals window to find any variables being affected by the current algorithm. In comparison, Figure 6-9 shows the Autos window.

Notice that the Autos window provides a more fine-grained view of both variables and the properties of objects from the current and previous lines. You would want to use Autos for a more targeted view of what is currently happening in the code.

Watch Windows

A Watch window allows you to create a custom list of variables to watch. You can drag and drop variables from the editor or type a variable name in the Watch window. Selecting Debug Windows Watch will display a list of four Watch windows, where you can have four different sets of data to inspect at one time. Figure 6-10 shows a Watch window with a variable.

Figure 6-10 The Watch window

Page 184
Image 184
Microsoft 9GD00001 manual Watch Windows, 161