如何在 Visual Studio 2010 调试器中查看后台线程
我试图弄清楚为什么在应用程序关闭并且窗口消失后应用程序进程仍在任务管理器中徘徊。
当我让 VS 附加到僵尸进程并中断所有进程时,线程窗口显示主线程仍然处于活动状态,并且还有一些工作线程。
一些问题:
工作线程一定是后台线程吗?如果没有,我如何识别后台线程,因为我在窗口中没有看到这样的列?
我是否只需双击线程窗口中的每个线程,然后观察 Thread.IsBackgroundThread 值?
当我单击主线程时,调试器不显示调用堆栈。如何 我如何确定主线程卡在哪里?
I'm trying to figure out why the application process lingers in Task Manager after the application is closed and the window disappears.
When I get VS to attach to the zombie process and break all, the threads window shows that the main thread is still alive, and a number of worker threads as well.
Some questions:
Are worker threads necessarily background threads? If not, how do I identify the background threads as I didn't see such a column in the window?
Do I simply double-click on each thread in the thread window, and watch the Thread.IsBackgroundThread value?
When I click on the main thread, the debugger doesn't show a call stack. How
do I identify where the main thread is stuck?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我强烈建议您使用 WinDbg。它不是一个可视化调试器,尽管它更强大。
我一定会弄清楚你的。
要列出进程中的所有线程,请使用:~。
切换到某个线程~thread_ids。
查看当前线程的 stak !clr_stack。
简要教程。
http://www.codeproject.com/KB/debug/windbg_part1.aspx
还可以尝试在google中“使用windbg调试Asp.net”
I would strongly sugest you tu use WinDbg. It is not a visual debugger though it is much more powerful.
Surely I will figure you out.
To list all threads in a process use: ~.
To switch to a certain thread ~thread_ids.
To see stak of curent thread !clr_stack.
Brief tutorial.
http://www.codeproject.com/KB/debug/windbg_part1.aspx
Also try in google "Debuging Asp.net with windbg"