Cannot See Values While Debugging ASP.NET Core - debugging

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.

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.

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.

Related

VS 2015 Update 2 - Variable does not exist when debugging, why?

I'm using VS 2015 Update 2 with an asp.net 5 web project configured for debug mode. When I run the project with F5 to debug it and hit a break point, some variables can not be observed in the watch window even when they are in scope. Further, if I hover over such variables no value is displayed.
If I use the same visual studio to create an empty web project and add a webform and place the code in the load method, the debugger works fine. That is to say, I can see the variables in the watch window and I can see their values by hovering over them. I glean from this that the root cause of the issue is not VS2015 Update 2 but rather something to do with the project or solution configuration, perhaps specific to asp.net 5 web projects.
I've scoured the web for answers and similar problems happen when trying to debug compiler optimized code. But I am running the solution in debug mode. Any suggestions?
I am aware of Variable does not exist in the current context while debugging but it applies to a different version of visual studio and the solutions offered there do not fix my issue.
I had the same problem. Eventually I noticed that some settings are different after update 2.
You need to go to Tools --> Options --> Debugging --> General and then check "Use Managed Compatibility Mode".
That worked for me.
This is a bug that was introduced in Visual Studio 2015 Update 2. Essentially the debugger is unable to inspect local variables in dynamic modules. We released a hotfix for it today. You can download the patch here. Documentation for the patch is here. Let me know if the patch does not fix your particular scenario.
Thanks!
-Patrick Nelson

Visual Studio 2015 DataTable/DataSet Visualizer crashes IDE

Whenever I try to open the DataTable or DataSet Visualizer it crashes the IDE.
I tried the various command-line switches to reset everything, started in /SafeMode and undertook a repair of VS.
Nothing has helped so far.
As far as I can tell it's only those two visualizers that crash.
I also tried starting VS with the /Log switch, but unfortunately it doesn't seem to log the crash there...
How can I find out what's the problem and fix it?
EDIT:
Seems like a problem with the .NET Framework prior to version 4.0:
https://connect.microsoft.com/VisualStudio/feedback/details/1711642
https://connect.microsoft.com/VisualStudio/Feedback/Details/1709336
I had the same problem after 4h experimenting I manage to fix it by going to
Tools => Options => Debugging and turning on Use Managed Compatibility Mode
Found better workaround
Tools => Options => Debugging and turning on Use the legacy C# and VB expression evaluators
This one doesn't turn off some new features like "Diagnostic Tools".
Update - Visual Studio 2015 Update 1 Fixes this problem
External debugger visualizers are currently broken in Visual Studio 2015. This includes the DataSetVisualizer and the WpfTreeVisualizer.
Go to Tools > Options > Debugging and turn on Use the legacy C# and VB expression evaluators

Avoiding merge problems when sharing solution between Xamarin Studio and Visual Studio

When sharing a solution between Xamarin Studio and Visual Studio, changes to solution/projects leads to unexpected results. The source text of the .sln/.project files has unexpected modifications, e.g.
UUIDs changed from lower to upper case
Reordering of lines in the .sln file
Changed "ToolsVersion"
Changed "Visual Studio" version
Other changes, like changing line break, changed "true" to "True", ...
This e.g. happens when changing the startup project, adding referenced projects, building the solution.
These changes lead to a "commit ping pong" between Xamarin Studio and Visual Studio users, and make merging harder. We experienced this problem with Xamarin Studio 5.5.4 and Visual Studio 2013 Update 4. The https://github.com/perpetual-mobile/SharingXamarinSolution repository contains examples. The http://forums.xamarin.com/discussion/comment/95851 thread also describes this issue.
How can this problem be avoided? Is it possible to prevent this from happening when using only Xamarin Studio and Visual Studio? Or do we need an additional tool (like e.g. cmake)?
One answer is to wait for version 6 of Xamarin Studio.
According to the bug report filed by Stephan Palmer, the issues raised above have been resolved in that version.
Are you seeing the same behavior if the project starts in Xamarin for Visual Studio versus Xamarin standalone versions?
The fastest workaround that comes to mind would be to use vcproj2cmake (uses Ruby)
http://sourceforge.net/projects/vcproj2cmake/
and use CMake scripting.
I highly recommend contacting Kitware and asking them for cross-compiling assistance - - they may already have a CMake script to resolve this issue since Xamarin is so popular.
kitware#kitware.com
Hope that helps,
ClaireW

visual studio 2010, how to access a code snippet?

I have used code snippets in VS 2005, VS 2008 like: {code snippet},{TAB},{TAB}. Since I migrated to VS 2010 I cannot use the 2 TAB combination anymore. How can I access it? I feel like a real noob :)
Edit:
I guess it works, but not for all of them... I tried for the get and didn't do anything. Maybe I should check what is with the get inside code-snippet manager.
The Tab+Tab combination is still the way to insert code snippets in Visual Studio 2010. It's likely another setting which is breaking this behavior. I would try reseting my Visual Studio settings and see if that fixes the issue
Tools -> Import / Export settings
Navigate through the wizard
Use the profile of your choice
It should be the same combination as before (tab-tab works for me!). It may be worth checking for any extensions you've installed that might override shortcuts...

VS.net 2008 issue with asp.net pages

I am having problem in using the source view of an asp.net page in VS.net 2008 IDE. I am not using Design view at all. IDE hangs a bit every now and then, when I use intellisense in it, and I scroll the page.
Please throw some light on it.
Such issues doesnt come up while editing the HTML page, and while editing same asp.net page with the HTML editor which can be configured using Tools -> Options menu option.
Read this Post
This might help to make your visual studio a bit faster in general. I am not very sure about the exact reason for the behavior you mentioned of your Visual Studio.
I suspect that it has something to do with Graphical Interfaces like Toolbox etc.
Thanks
I've had problems like that with Visual Studio before. The intensity of the problems seem to multiply exponentially as the size of the file I work with gets larger.
Here's what I'd reccomend:
Check and make sure Visual Studio is fully updated (Help > Check For Updates) ; there have been some patches released and they will help you immensly!
If your code has any breakpoints, disable them all and start afresh later (Debug > Disable All Breakpoints)
If that fails, here are some more optimizations you can try.
In my case, I think longer file is the culprit. I think partial page concept should be applicable to asp.net page too.

Resources