[英]Attach debugger onto another Visual Studio instance
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 ). 我正在Visual Studio 2010中进行一些visual studio扩展开发。在开发时进行调试会很有用所以我将它配置为在调试F5时打开另一个VS实例( 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. 这一切都运行良好,但有没有办法将调试器附加到现有的VS2010实例,我已经尝试过,断点没有被击中。 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. 我应该添加我知道如何附加到调试器,我之前使用它来附加到ASP.net代码。
Under Debug there is a item called Attach to Process. 在Debug下有一个名为Attach to Process的项目。 This will do exactly what you want it to do. 这将完全符合您的要求。
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). 使用Title列告诉您要连接的devenv.exe的哪个实例(注意我在BinaryFileSearch上启动了附加,但我附加到FixClientNoteRTF)。
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? 它不会让你依附于自己,因为如果你遇到了一个breakepoint,UI会停止响应,你会告诉它如何步骤或继续?
OK managed to solve it. 好设法解决它。 What I was doing was when opening an instance of Visual studio, following the usual method, ie open a normal instance ( devenv.exe). 我正在做的是按照常规方法打开Visual Studio实例,即打开一个普通实例(devenv.exe)。 What you have to is open a experiemental instance, using the parameters ( cmd line mode): /rootsuffix Exp 你需要的是使用参数(cmd行模式)打开一个实验实例:/ rootsuffix Exp
Then use the attach to debugger mode to attach to this instance. 然后使用attach to debugger模式附加到此实例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.