本文介绍了如何在不停止进程的情况下停止调试(或分离进程)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常使用 VS 2008 来调试应用程序的 .NET C# 组件.有时,我想退出调试并继续运行应用程序.停止调试会终止我正在调试的进程.

I often use VS 2008 to debug a .NET C# component of an application. Sometimes, I want to quit debugging and continue running the application. Stop Debugging kills the process I was debugging.

我怎样才能实现我的目标?

How can I achieve my aim?

这不是网络应用,而是运行托管和非托管代码的本地进程.

This is not a web app, it's a local process that runs managed and unmanaged code.

我在调试菜单中找到了全部分离"选项,但它已禁用(灰显).

I found the "Detach All" option in the Debug menu, however it is disabled (grayed out).

推荐答案

如果您在混合模式下调试,则无法将调试器从进程中分离.

You cannot detach a debugger from a process if you are debugging in mixed mode.

确保在附加到进程时以托管或本机模式进行调试:确保在项目选项中取消选中启用本机代码调试"或本机代码",或者在不调试的情况下启动程序,选择附加到进程",然后选择仅托管或仅本机.

Make sure you are debugging either in managed or native mode while attaching to the process: either make sure "Enable native code debugging" or "Native Code" is unchecked in your project options, or start the program without debugging, choose "Attach to Process", and select only Managed or only Native.

这篇关于如何在不停止进程的情况下停止调试(或分离进程)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 06:14