Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual studio 2017 Evaluate expression (Debug mode)

I have looked everywhere and I can't seem to find a place where I can evaluate an expression while debugging.

The only thing I can find is Execute in interactive however this doesn't support the direct expression evaluation.

This annoys me since it's one of the features I use the most :)

Does anyone know where it is in Visual Studio 2017 Community edition

enter image description here

like image 653
Marc Rasmussen Avatar asked Jul 22 '17 11:07

Marc Rasmussen


People also ask

How can I see the variable value while debugging in Visual Studio?

When stopped in the debugger hover the mouse cursor over the variable you want to look at. The DataTip will appear showing you the value of that variable. If the variable is an object, you can expand the object by clicking on the arrow to see the elements of that object.

How do you evaluate expressions in Vscode?

Expressions can be evaluated with the Debug Console REPL (Read-Eval-Print Loop) feature. To open the Debug Console, use the Debug Console action at the top of the Debug pane or use the View: Debug Console command (Ctrl+Shift+Y).


2 Answers

In the QuickWatch window (Debug -> QuickWatch or Shift + F9) you can evaluate expressions while debugging. enter image description here Is this the functionality you're looking for?

like image 133
Floris Devreese Avatar answered Sep 19 '22 16:09

Floris Devreese


I think the thing you're looking for is the Immediate window.

Debug > Windows > Immediate 
like image 40
GMon Avatar answered Sep 20 '22 16:09

GMon