Compartir a través de


How to: Refresh Watch Values 

While evaluating an expression in the debugger, you might see an icon that looks like two green arrows, circling in opposite directions within a green circle. This icon indicates that the value displayed by the debugger is not current. The value may or may not be correct, but it is out of date. To reinforce this fact, the value is also grayed out.

The refresh icon and grayed value can appear for the following reasons:

  • An error occurred while evaluating the expression. For example, there was a time out, a variable was out of scope, and so on.

  • Evaluating the expression would require running code, but automatic evaluation of such expressions is turned off.

Automatic evaluation can be turned off to prevent unwanted side effects. Occasionally, a programmer may turn off automatic evaluation without realizing it.

If you move the mouse cursor over the red exclamation mark, a tooltip appears, explaining the reason the value is out of date.

To update an out-of-date value

  • Click on the refresh icon.

    —or—

  • With the value selected, press the space bar.

    The debugger attempts to reevaluate the expression. If the exclamation appeared because automatic evaluation of properties and implicit side effects was turned off, it will now be evaluated.

To turn automatic property evaluation on/off

  1. From the Tools menu, click Options.

  2. In the Options dialog box, open the Debugging node, and click General.

  3. Select or clear Evaluation: Always allow property and other implicit function calls.

  4. Click OK.

See Also

Concepts

Side Effects and Expressions