I'm working with ASP.NET core 2.0. When debugging, I want to inspect the values of some variables on my razor views, however it's not showing the values when I mouse over them, it just shows the variables Type, like it would when not debugging.
I found the following question posted over 2 years ago with the same problem in VS2015, however the suggestions there have not worked for me, it also suggested it was a known problem, and was to be fixed in a VS2015 update.
'Use Managed Compatibility mode' under Tools->Options-Debugging didn't solve it.
I'm running VS2017 Community v15.7.2
Cannot See Values While Debugging ASP.NET Core
Solution 3. Set a break point where your variable is used and start debugging. When execution stops at the break point, change the content of your variable in the local window and resume execution by pressing F5.
Set a breakpoint on line 17. Run the app again. You can even debug the Razor Pages with markup and inspect the values of variables!
Open the QuickWatch window by right clicking on a variable and selecting “QuickWatch…” or by using the keyboard shortcut Shift+F9.
As of 7/3 this appears to be a known issue with a fix in the works. See (now closed) Visual Studio bug #249225, and it's linked item Visual Studio Bug #246728. Consensus appears to be that this broke in the 15.7+ builds, with recommendations to use the watch window as commented above or downgrade to a 15.6 build as potential workarounds.
On the linked ticket, recent comment indicates it may be fixed with the 15.8 preview, so work is ongoing.
Hope this helps anyone else who wanders by!
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