Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot See Values While Debugging ASP.NET Core

When debugging an ASP.NET Core application, using Visual Studio 2015, I cannot see the variable, parameters and field values, when, for example, I hover them. I cannot add them to the watch as well. I am running in debug.

like image 421
Ricardo Peres Avatar asked Feb 21 '16 23:02

Ricardo Peres


People also ask

How do I view variables in debugging?

The most commonly used way to look at variables is the DataTip. 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.

How do I show local variables in debugging?

You can view local variables and parameters by entering the dv command or the dt command in the Debugger Command window.

Which of the following Windows displays the variables while debugging?

The Autos and Locals windows show variable values while you are debugging. The windows are only available during a debugging session. The Autos window shows variables used around the current breakpoint.


2 Answers

We might have found a solution (or at least a workaround) for the problem. If we go into Tools > Options > Debugging and enable Use Managed Compatibility Mode then we can inspect all the values we like.

I hope this solves the issue for you as well.

Update: Visual Studio 2015 Update 2 RC fixed the issue for me, but unfortunately not for the OP.

like image 112
Johan B Avatar answered Oct 11 '22 08:10

Johan B


This behavior happens with 1.0.0-rc1-update1, but not with 1.0.0-rc2-16357. If possible, upgrade. Microsoft is aware of it.

like image 42
Ricardo Peres Avatar answered Oct 11 '22 06:10

Ricardo Peres