I\'m using Visual Studio 2015 preview, and I\'m trying to debug my project. I was using VS 2012 previously, and depended largely on being able to hover over and expand local
It might be a bug. Please file a Connect bug with a repro if you have one.
In the meantime, you might be able to workaround the problem by setting the debugger options to use the legacy debug engine: Tools -> Options -> Debugging -> General: check both "Use the legacy C# and VB expression evaluators" and "Use Managed Compatibility Mode".
That workaround has worked for me every time. But please, do still file the bugs!
As described here, you need to enable the check “Suppress JIT optimizations on module load (Managed only)” in Debug --> Options --> Debugging --> General.
You need also to remove the "Optimize code" flag in the properties of your projects.
In my case the Solution Configuration was set to Debug but the Solution platform was set to Mixed Platforms. Setting the Solution Platform to Any CPU fixed the issue
This worked for me in VS2017(My VS is in german so the tab names could be a bit different):
Project -> Properties -> C/C++ -> Code Generation -> RunTimeErrorCheck->\RTC
Also try deactivating the optimization option since making your code faster could mean not being able to watch the values of your local variables:
Project -> Properties -> C/C++ -> Optimization -> Disabled
I'm working on a 'Debug' configuration that have no optimization set, so I repeat :
Using managed compatibility : can use breakpoint, but cannot watch values
Not using managed compatibility : cannot use breakpoint, but can watch values
Hence using the assert as breakpoint when not using managed compatibility allows you to both stop where needed AND watch values.
Try it.
I provided you with my trick because I'm just facing the same issue right now, 1w before final delivery. And MS pretend planning a complete fix for 2016 in update 2 is just unbearable.
BTW, this makes another perfect 'break' :
int *p = NULL, i = 1 / *p;
Kochise
I had a project that was using minified JavaScript files and wanted to use the TypeScript files for debugging. I put the unminified JavaScript and the associated TypeScript into the project and changed the references to use the normal JavaScript file and not the minified one. My break points were hit in the TypeScript file but I was not getting hover information (surprisingly it looked like adding the object/variable as a watch seemed to work).
To fix I just excluded the minified JavaScript from the file from the project and included the JavaScript. (The TypeScript file I left excluded).