Reputation: 2526
I am used to Jetbrains IDEA and Java, but now I have a project in .NET/C# and using Visual Studio 2017 (Community).
If I debug code in IDEA, I can always run code when the execution is stopped at a breakpoint using the 'Evaluate Expression' function of the IDE: https://www.jetbrains.com/help/idea/evaluating-expressions.html (Although it is for PyCharm, the Java one works the same: GIF).
Is there anything similar in Visual Studio?
Upvotes: 45
Views: 41817
Reputation: 483
The Visual Studio debugger includes expression evaluators that work when you enter an expression in the QuickWatch dialog box, Watch window, or Immediate window. The expression evaluators are also work in the Breakpoints window and many other places in the debugger.
Here's documentation
Upvotes: 7
Reputation: 136
The closest I could find for the "Quick Evaluate Expression" from IntelliJ in Visual Studio is the "Quick Watch" tool.
You can either select your variable/expression and use the shortcut
or use the context menu, right-click and hit "Quick Watch".
Upvotes: 3
Reputation: 61
Simply highlight the expression, right click and select "Evaluate in Debug Console" - it will give you the result in the DEBUG CONSOLE
Upvotes: 6
Reputation: 876
I have the exact same issue.
After researching I found the closest thing is Immediate Window
which give you some intelligence while typing.
Upvotes: 52