简体   繁体   English

将调试器附加到另一个Visual Studio实例上

[英]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.

相关问题 将调试器附加到Visual Studio 2017的另一个实例 - Attach debugger to another instance of Visual Studio 2017 Visual Studio - 以编程方式将调试器附加到远程进程 - Visual studio - Attach debugger to remote process - programatically 将Visual Studio调试器附加到VS IDE主机 - Attach Visual Studio debugger to VS IDE Host 将流程附加到Visual Studio 2013中的调试器 - Attach process to debugger in Visual Studio 2013 将调试器附加到 IIS 实例 - Attach Debugger to IIS instance 将Visual Studio调试器附加到Windows服务 - “附加”灰色 - Attaching Visual Studio debugger to Windows service — “attach” greyed out Visual Studio 2012加载项 - 如何将调试器附加到进程 - Visual studio 2012 add-in - how to attach debugger to a process 如何在Visual Studio调试器中查看没有实例的静态类成员? - How to view static class members without an instance in Visual Studio debugger? 如何将调试器附加到除我在Visual Studio 2017中启动的其他进程之外? - How do I attach a debugger to other process than I start in Visual Studio 2017? 使用Visual Studio IIS Express将VSCode调试器附加到.NET Core应用程序调试 - Attach VSCode debugger to .NET Core app debugging with Visual Studio IIS Express
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM