I'm trying to debug the seed method of an EF migration.
I've added a Debugger.Launch()
statement. When it's run I get the message box to attach:
But there's no option to use the existing instance of Visual Studio.
This happens to me quite frequently. I use very large Visual Studio solutions that sometimes hang or have other weird behavior. For instance, if I click the "x" the UI goes away, but there's still a "devenv.exe" from that solution left running.
Usually, killing all devenv.exe and restart will work. I believe what happens here is that the JIT debugger window (or it's caller) has a timeout for finding VS processes. If one of your VS processes has hung or is otherwise unresponsive, the timeout occurs and it bails out. I always notice that the JIT window takes a little longer to popup than normal when this problems manifests. The extra time length is almost always the same. That makes me feel fairly confident in my diagnosis.
Thus, I would recommend looking for any stray devenv.exe processes and forcefully killing them. Also, look to see if any of your VS windows have popups that might block responsiveness. As a last resort, shut all devenv processes down and restart one. That always works for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With