问题
I have just started working on a Windows Store App written in C#, it has not yet been published to the Windows Store. When I give a debug build of the app being developed to my testing team and it crashes where can they find the crash log and stack trace? Do I need to do anything when building my application? I'm looking for the standard solution, not a third party library or something that sends me reports from end-users. I'm coming from an Android world where the ADB logcat always contains the Java stack trace, I'm looking for the equivalent in C#/WinRt.
回答1:
Crash dumps will contain the callstack and much more.
To collect crash dumps, first, execute the following regedit script:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps]
"DumpFolder"="C:\\Temp\\CrashDumps"
"DumpCount"=dword:00000002
"DumpType"=dword:00000002
Second, reproduce the crash.
Third, stop crash dump recollection by executing:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps]
"DumpFolder"=-
"DumpCount"=-
"DumpType"=-
Fourth, get the crash dump from C:\Temp\CrashDumps
More info at MSDN.
来源:https://stackoverflow.com/questions/15797671/how-do-i-get-crash-logs-and-stack-traces-from-winrt-apps-written-in-c