调试正在进行的.NET程序正在进行、程序、NET

2023-09-06 14:24:47 作者:╱/遂ヽ不能.自已

我有一个程序,我写这永远只能表现为程序冻结当它运行的没有的调试器附着一个相当恼人的错误。工作线程活着,但主线程冻结和Windows淡出窗口出白色的,并告诉我没有响应的程序。

I have a rather annoying bug in a program I'm writing which only ever manifests itself as the program freezing when it is run without the debugger attached. Worker threads stay alive but the main thread freezes and windows fades the window out to white and tells me the program isn't responding.

有没有办法来调试器附加到一个持续的.NET进程,以发现究竟哪一种方法,主线程被冻结在?

Is there a way to attach a debugger to an ongoing .net process to discover exactly which method the main thread is frozen in?

推荐答案

您可以使用调试调试器附加>附加到进程选项。

You can attach the debugger using Debug > Attach to Process option.

它会列出所有的进程,你选择你的进程来启动调试。

It will list all the processes and you select your process to start debugging.