Daily Usage Issues

keys stop working after failed debug session

Started by cray17 on 4,856 views

Ok so say you debug a unit test and it stops at a breakpoint. Maybe you make an edit-and-continue change maybe not... you then F5 such that the test runs to completion, passes.

Not only does NCrunch not end the debugging session (I have to press the stop button, wait for about 30 seconds for it to seemingly timeout and the force stop it) but after this my keyboard stops working in Visual Studio!?

Actually, wherever my cursor is i can still enter text, but Backspace, Arrow Keys, etc... all do not work whatsoever. The only solution I've found for this is to completely restart visual studio. Considering it takes a good 5 minutes for solution-load and NCrunch to build everything to 0% CPU usage, this is obviously nightmare fuel for accidently letting any test run to completion in debug mode...

No offense but I hope this is NCrunch's fault! Becuase I know remco will rev a fix for this quick :)

Thanks,
Chris.

PS: VS 2017 ncrunch 3.17.0.2
Hi Chris,

I'm sorry to say that this is not likely to be NCrunch's fault. NCrunch's integration with the debugger is a few minimal lines of boilerplate code, where we tell it to attach to a process, or to detach at the end of a test run.

The debugger is an extremely complex beast and I've observed issues like the one you've described both come and go over the years. I suggest checking to make sure you have all the latest VS updates installed.

Edited

I understand. It's weird that it does it everytime I debug a test using NCrunch, but not when I debug using regular test explorer. That's what led me to believe it was an ncrunch issue. I'm running 15.7.3. Oh well...
cray17 wrote:I understand. It's weird that it does it everytime I debug a test using NCrunch, but not when I debug using regular test explorer. That's what led me to believe it was an ncrunch issue. I'm running 15.7.3. Oh well...


There are differences in behaviour when using NCrunch compared with other runners.

When using the debugger, NCrunch first launches the process, then attaches to it. When the test run completes, NCrunch detaches and then terminates the process later.

Most other runners will launch the process with the debugger already attached, and will let it run until the test run completes. They then terminate the process and the debugger automatically detaches.

Probably there is something in NCrunch's workflow that triggers the issue inside the debugger.

Something you can try is changing the way you complete your debug session. After you have the information you need from the debugger, try terminating the process in VS instead of letting the debugger run and the test complete. This should give you an alternative workflow that will hopefully prevent the IDE from becoming unstable.

I appreciate how frustrating this problem is. I have a special swear jar for debugger related issues. The worst thing about them is their timing - they tend to appear when you're neck deep in a problem with everything set up just right.

Post a reply

Log in to reply.