Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET application hangs and I can't debug it

I'm working on a multithreaded C# server for Syslog. I'm trying to perform a long-running experiment, but I found that after one hour the server hangs (after a certain time, logging stops).

I tried then to run it in Debug mode in Visual Studio and when I found it hanging and tried to press Pause in order to get useful information on where the threads were, Visual Studio said that Remote Debugging Monitor crashed. It's a local application.

What can I do to pause the process and get useful information about thread status?

like image 940
usr-local-ΕΨΗΕΛΩΝ Avatar asked May 02 '26 15:05

usr-local-ΕΨΗΕΛΩΝ


1 Answers

Managed stack explorer will poll a managed application and log what is currently happening.

This article may also be useful (section about hang mode dump), but will require debugging a crash dump file (WinDbg is not as easy to absorb as Visual Studio and will take some time to learn).

like image 122
StingyJack Avatar answered May 05 '26 04:05

StingyJack



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!