Build/Test Issues

Debug hangs after enabling .NET Framework source stepping

Started by RobertTheGrey on 5,860 views

In VS2015 I was debugging one of my tests just fine, but was getting a NULL ref exception from inside external framework code on one of my lines. So in debug options I ticked "Enable .NET Framework source stepping" which disables the "Just My Code" option and should allow me to step through symbol source. Since ticking that box, and I try "Break into test at this line" VS2015 hangs and I have to end task on it. Worse than that, I unticked the box to put it back the way it was and NCrunch now hangs on any test I try and break into - so basically I can't ever debug anymore even though I've restored the setting back to the way it was.

I tried to change my projects from "Any CPU" to x86, and tried again but it hung. I changed to x64 and this time I got the dialog saying that the process is taking to long, would I like to terminate the remote session, and then when I terminated it, VS2015 cam back fine - didn't need to kill the process.

But still no luck debugging via NCrunch after multiple restarts. Any help much appreciated, even if it's just a way to reset it back to the way it was.
Hi, thanks for sharing this issue.

I suspect there may be an issue with the debugger itself in VS2015. NCrunch doesn't really do much with the debugger other than ask it to attach to an existing process. There is another user that has reported a similar issue, which eventually was reported to MS and the team has acknowledged it to be a problem with the debugger. See for more information - http://forum.ncrunch.net/yaf_postst1622_Unable-to-Debug-tests-in-Visual-Studio-2015.aspx.

Something that may be worth trying is to perform a full reset of your VS configuration to see if there is something in the registry hive that is triggering the problem. When launching VS, try running 'devenv.exe /rootsuffix test'. This will make VS use a different registry hive for the session, effectively making it work temporarily with all configuration reset. If this doesn't work, it may be worth trying to reinstall Visual Studio (sorry, I know its painful, but we really don't know what's broken in there).
Thanks Remco - seems my entire debugger was broken by something. I couldn't debug with R# or run my web project any more either - only after a VS repair did the debugger start working again.
I'm glad a rebuild fixed the problem! No idea what happened here, but it's good that you're back up and running :)

Post a reply

Log in to reply.