Attach debugger onto another Visual Studio instanc

2019-01-15 20:38发布

I'm doing some visual studio extension development in Visual Studio 2010. It would be useful to debug while developing so I have it configured to open another instance of VS when debugger for F5 ( http://donovanbrown.com/post/How-to-debug-a-Visual-Studio-Extension.aspx). This all works fine but is there a way to attach a debugger to an existing instance of VS2010, I have tried and the breakpoints aren't being hit. There are no errors but wondering if there is a way?

I should add I do know how to attach to a debugger and I have used it before to attach to ASP.net code.

2条回答
相关推荐>>
2楼-- · 2019-01-15 21:22

Under Debug there is a item called Attach to Process. This will do exactly what you want it to do. enter image description here

Use the Title column to tell which instance of devenv.exe you want to connect to (notice that I started the attach on BinaryFileSearch, but I am attaching to FixClientNoteRTF). enter image description here

It does not let you attach to yourself because if you hit a breakepoint the UI would stop responding and how would you tell it to step or continue?

查看更多
Fickle 薄情
3楼-- · 2019-01-15 21:24

OK managed to solve it. What I was doing was when opening an instance of Visual studio, following the usual method, i.e. open a normal instance ( devenv.exe). What you have to is open a experiemental instance, using the parameters ( cmd line mode): /rootsuffix Exp

Then use the attach to debugger mode to attach to this instance.

查看更多
登录 后发表回答