5

When debugging a C# application in Visual Studio 2015, I am very often getting this message when hovering the mouse over a variable:

enter image description here

After this it freezes and restart, making it impossible to debug.

Anyone have any clue?

Raul Kist
  • 331
  • 3
  • 8
  • Take a look: https://social.msdn.microsoft.com/Forums/vstudio/en-US/8653d0d1-c7ed-4194-8fdc-f183d4ff4ec2/problems-with-debugging-in-vs-2015-when-execution-is-in-a-thread?forum=vsdebug – Leo Chapiro Sep 23 '16 at 14:56
  • Indeed, I found this article when I was looking for a solution. I also found these: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f3e0c708-0cb4-4e15-9f80-8e713870ebcd/debugging-cant-hover-over-variables-to-see-their-values?forum=visualstudiogeneral and https://blogs.msdn.microsoft.com/visualstudioalm/2013/10/16/switching-to-managed-compatibility-mode-in-visual-studio-2013/ But nothing is solving this for good. – Raul Kist Sep 26 '16 at 14:58

3 Answers3

7

Like that thread shared by duDE, please disable the option "Enable property Evaluation and other implicit function calls" under Tools->Options->Debugging->General.

Grant Winney
  • 65,241
  • 13
  • 115
  • 165
Jack Zhai
  • 6,230
  • 1
  • 12
  • 20
  • Resolved in Visual Studio "15" Preview 5: https://blogs.msdn.microsoft.com/visualstudio/2016/10/05/announcing-visual-studio-15-preview-5/ – Leo Gurdian Feb 10 '17 at 21:32
  • this worked for me. You need to close Visual Studio after the change though to take effect. thanks – Alfred Roa Nov 11 '17 at 14:43
2

It seems that checking this option:
Tools -> Options -> Debugging -> General: "Use Managed Compatibility Mode".
avoids Visual Studio 2015 from crashing but disables Edit and Continue... which is no good.

So, I am still looking for a better answer.

Sources:

Quoting the last one:

In Visual Studio 2012, we introduced a new managed debug engine that provides us the ability to more rapidly add new features compared to the older implementation. This can be seen by the number of features introduced in Visual Studio 2013 after only a single year including Managed Return Values, .NET 64-bit Edit and Continue, Async Callstacks Enhancements, and Improved Tasks Window to name a few. Unfortunately, there are still a couple scenarios that are not supported yet with the new debug engine, so in these cases you will have to switch back to the legacy engine.

...so it seems that this is not new.

Community
  • 1
  • 1
Raul Kist
  • 331
  • 3
  • 8
0

This issue should be fixed in Visual Studio "15" Preview 5 (available here. For Visual Studio 2015 Update 3 there are, unfortunately, no known workarounds other than those already mentioned.