是否可以将两个调试器附加到一个进程? [英] Is it possible to attach two debugger to one process?
问题描述
是否可以将两个调试器附加到一个进程?
Is it possible to attach two debugger to one process ?
最近,我用HTML5/CSS开发了Metro Metro应用程序,该应用程序调用了用C#编写的Window Runtime Component.我想要做的是将两个调试器附加到同一进程. JavaScript&一另一个使用C#代码.
Recently, I had developed a Metro Style App in HTML5/CSS and that was calling a Window Runtime Component written in C#. What I wanted to do was attach two debugger to same process. One at JavaScript & another at C# code.
我遵循的步骤:
我打开了两个针对相同解决方案的Visual Studio实例.
I opened two visual studio instances targeting same solution.
- 我在JavaScript代码中设置了一个断点,然后通过VS实例1 f5/运行该应用程序.
- 但是,当我尝试通过VS实例2在C#窗口运行时组件中附加第二个调试器时,它给我一个对话框,提示调试器已附加到进程中".
我看过一个Windows Runtime演示,演讲者成功地做了同样的事情.请帮我解决这个问题.
I've seen a Window Runtime presentation in which the speaker did the same successfully. Kindly, help me out with this.
推荐答案
那是不可能的.
请参见此处:
对于仅托管调试和仅本机调试,您只能附加1 调试器到一个进程.
For both managed-only and native-only debugging, you can only attach 1 debugger to a process.
为什么?
本机调试器窃取调试事件 从托管调试器的下面.这使 托管调试器,将导致崩溃.本机调试器具有 在这里无法与托管调试器进行协调.
The native debugger steals debug events from underneath the managed debugger. This confuses the managed-debugger and will cause it to crash. The native debugger has no way of coordinating with the managed-debugger here.
这篇关于是否可以将两个调试器附加到一个进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!