The Watch Window: Refreshing Data
Keyboard: SPACEBAR (refresh data)
Menu: Tools -> Options -> Debugging -> General
Versions: 2008,2010
Published: 10/11/2010
Code: vstipTool0107
When you evaluate an expression in the debugger, one of two refresh icons might appear in the Value column. One refresh icon is a circle that contains two arrows, which circle in the same direction. The other is a circle that contains two wavy lines that resemble threads. Here is an example:
Refresh Icons
Here is what the documentation (https://msdn.microsoft.com/en-us/library/z4ecfxd9.aspx) has to say about these icons:
Circling Arrows
If the circling arrows appear, the expression was not evaluated for one of the following reasons:
1. An error occurred as the expression was being evaluated. For example, a time-out might have occurred, or a variable might have been out of scope.
2. Evaluating the expression would have required evaluating a property or making an implicit function code. Evaluation of properties and implicit function calls can have side effects that affect the state of your program. Because these effects can make debugging more difficult, automatic evaluation of properties and implicit functions calls by the debugger is often turned off. Occasionally, a programmer might unintentionally turn off automatic evaluation.
If you want to learn more about side effects, you can go here: https://msdn.microsoft.com/en-us/library/a7a250bs.aspx
Two Threads
If the two threads appear, the expression was not evaluated because of a potential cross-thread dependency. A cross-thread dependency means that evaluating the code requires other threads in your application to run temporarily. When you are in break mode, all threads in your application are typically stopped. Allowing other threads to run temporarily can have unexpected effects on the state of your program and causes the debugger to ignore events such as breakpoints.
Refreshing the Data
To refresh the data, just click the icon or press the SPACEBAR:
Turning It Off
Although, not suggested, you can turn this feature off by going to Tools -> Options -> Debugging -> General and deselecting the "Enable property evaluation and other implicit function calls":
Comments
Anonymous
October 10, 2010
The feature being "turned off" is exactly what causes automatic evaluation as described in Cirling Arrows, point 2, to not occur.Anonymous
October 19, 2010
"... a circle that contains two arrows, which circle in opposite directions ..." They're pointing in opposite directions, but they're circling in the same direction: clockwise.Anonymous
December 12, 2010
The comment has been removed