I’ve always wondered this, but finally took the time to ask Dustin Campbell when I met with him last week for Debugger tips.
The autos window shows the current statement and the previous statement. it was always the previous statement that threw me off, as i never took the time to look closely enough to realize that’s where that variable was coming from.
The locals window shows everything currently in scope. Thus, the autos window is a subset of the locals window.
For example, consider the following code snippet that does nothing but produce warnings for unused variables:
In the Auto windows, you’ll see the previous statement and the current statement being evaluated:
In the Locals window, you’ll see the everything in scope, including the args parameter:
Technorati Tags: VS2005Tip,VS2008Tip