如何停止调试(或分离过程)而不停止进程? [英] How to stop debugging (or detach process) without stopping the process?

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

问题描述

我经常使用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.

如何达到我的目标?

这不是一个网络应用程序,它是一个运行托管和非托管代码的本地进程。

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.

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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆