Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto-refresh in watch window in Visual Studio [duplicate]

Possible Duplicate:
“This expression causes side effects and will not be evaluated”. How to suppress?

I am using Watch window in Visual Studio. I have added some variables in Watch window. Sometimes to get the value while debugging I have to click the refresh icon. Isn't there some setting that allows it to auto-refresh ?

like image 699
Brij Avatar asked Nov 15 '12 10:11

Brij


People also ask

How can you update out of date values in the watch window?

Refresh watch values A refresh icon (circular arrow) might appear in the Watch window when an expression is evaluated. The refresh icon indicates an error or a value that is out of date. To refresh the value, select the refresh icon, or press the spacebar.

How do I quick watch in Visual Studio?

It's available from Debug | Windows | Watch | Watch 1 or Ctrl + Alt + W + 1. There are 4 watch windows in Visual Studio, which you can use in different contexts (Watch 1, Watch 2, etc.). Any expression can be entered into the watch window.

How do I activate hot reload?

First, enable it in your IDE settings: On Windows, check the Enable XAML Hot Reload checkbox (and the required platforms) at Tools > Options > Debugging > Hot Reload. In earlier versions of Visual Studio 2019, the checkbox is at Tools > Options > Xamarin > Hot Reload.


1 Answers

You can append ,ac to the watch expression to have it automatically refresh the value.

E.g. Instead of xyz.ToString() use xyz.ToString(),ac.

See this answer for more information.

like image 144
ymln Avatar answered Oct 26 '22 06:10

ymln