Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"This expression causes side effects and will not be evaluated". How to suppress?

I'm getting this message in watch box.
Actually, my expression doesn't have any side effect, and I need to re-evaluate it automatically each time. How can I achieve that?

like image 685
fithu Avatar asked Nov 14 '10 17:11

fithu


1 Answers

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

x.ToString(),ac

See http://msdn.microsoft.com/en-us/library/e514eeby.aspx for more information and other format specifiers.

thanks to Scott Visual Studio: Make debugger aware that a function doesn't cause "side effects"

like image 54
zproxy Avatar answered Oct 19 '22 10:10

zproxy