Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JIT Debugger only options are new instance of Visual Studio

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:

enter image description here

But there's no option to use the existing instance of Visual Studio.

like image 982
BanksySan Avatar asked Sep 14 '25 00:09

BanksySan


1 Answers

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.

like image 160
Ryan Knuth Avatar answered Sep 15 '25 18:09

Ryan Knuth