Megosztás a következőn keresztül:


How to: Refresh Watch Values

This topic applies to:

Edition

Visual Basic

C#

C++

Web Developer

Express

Topic applies Topic applies Topic applies Topic applies

Standard

Topic applies

Topic applies

Topic applies

Topic applies

Pro and Team

Topic applies

Topic applies

Topic applies

Topic applies

Table legend:

Topic applies

Applies

Topic does not apply

Does not apply

Topic applies but command hidden by default

Command or commands hidden by default.

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 or off

  1. On the Tools menu, click Options.

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

    Depending on your IDE settings, you may need to select Show all settings to see the Debugging node.

  3. Select or clear Enable property evaluation and other implicit function calls.

  4. Click OK.

See Also

Concepts

Side Effects and Expressions