If you use a method call in an expression in the Watch Window, Visual Studio does not constantly evaluate the expression all the time and instead says
This expression causes side effects and will not be evaluated
I appreciate the necessity for this, but every time that I do want to evaluate the expression, the only ways I’ve found so far are:
I already looked through the list of commands that I can assign keyboard shortcuts to, and the only relevant I found is Debug.EvaluateStatement, which sounds like it’s exactly what I need, but it doesn’t appear to have any effect.
Is there a keyboard-assignable command to evaluate expressions in the Watch window?
If you've installed Visual Studio 2013, there's a new keyboard shortcut -- Alt+F12 -- that will give you a preview of the method being called inline. You can use the Esc key to close the preview.
The keyboard shortcut required is Space. It is not a customisable command though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With