Get stacktrace of all threads

I would like to write a stack trace of all threads in my C # application (UI). I can get a stack trace of all managed threads using WinDbg with the following commands.

.loadby sos mscorwks
~ * e! clrstack

Are there any other simple methods to get the stop code of all threads in my C # application? This is because I want to get a column when the application is running on the client’s machine, and the client is not a technical person.

Please help me.

Thanks!

+4
source share
2 answers

Here, the sentence will try to grab a custom application dump using either Adplus + WinDbg or DebugDiag. And debug postmortem using userdump

Here's a good article on how to automatically record user dumps when process crashes

Good Reading Tess Fernandez's Blog at msdn

http://debuggingblog.com/wp/2008/10/31/beginner-guide-to-windbg-part-1/

+1
source

Yes, you can do this in real mode if you also deploy Windbg on the client machine, and then use WMemoryProfiler to execute the debugger command. This sounds strange, but you can actually debug yourself using the debugger automatically.

Look here :

private static void SelfDebug() { using (var debugger = new MdbEng()) { string[] output = debugger.Execute("~*e!ClrStack"); Console.WriteLine(String.Join(Environment.NewLine, output)); } } 
+1
source

All Articles