How do I get crash logs and stack traces from WinR

2020-07-10 05:29发布

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条回答
Ridiculous、
2楼-- · 2020-07-10 06:14

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.

查看更多
登录 后发表回答