我怎么能告诉调试器不停止一些重要的主题? [英] How can I tell debugger to don't stop some critical threads?

查看:131
本文介绍了我怎么能告诉调试器不停止一些重要的主题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个项目的解决方案:网络的dll和exe文件服务器。我希望在不影响网络引擎线程以某种方式调试我的服务器组件。我不知道它是如何能够在所有被分开。唯一可能的解决方案,我知道是创建非托管的CLR主机的网络引擎,但我​​已经有我的C#的网络引擎。

I have 2 projects in solution: network dll and server exe. I want to somehow debug my server assembly without affecting network engine threads. I am not sure how it can be seperated at all. The only possible solution I know is to create unmanaged CLR host for network engine but I already have my C# network engine.

推荐答案

没有那是不可能的。据该博客这就是断点如何工作的:

No that's not possible. According to that blog thats how breakpoints work:

http://blogs.msdn.com/ B / jmstall /存档/ 2004/12/28 / 339756.aspx

第3部分:通知调试器

[左侧]现在,断点命中,CLR需要挂起所有托管的线程(这样的过程可以检查),并通知调试器。只是命中断点将平的助手线程的线程要求运行时暂停。它会阻止本身的SEH滤波器等待调试对象的内部被暂停。一旦该进程被暂停,所有的线程将保持阻塞,直到调试恢复。这可以确保线程不运行时调试器试图检查它们!

[Left-Side] Now that the breakpoint is hit, the CLR needs to suspend all managed threads (so that the process can be inspected) and notify the debugger. The thread that just hit the breakpoint will ping the helper thread to request that the runtime be suspended. It will block itself inside of the SEH filter waiting for the debuggee to be suspended. Once the debuggee is suspended, all threads will remain blocked until the debuggee is resumed. This ensures that threads are not running while the debugger is trying to inspect them!

您可以尽管开始为您的网络引擎一个单独的进程。但我想那不是你想要任何东西。

You could start a separate process for your network engine though. But I guess thats not what you want either.

这篇关于我怎么能告诉调试器不停止一些重要的主题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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