如何从用C#编写的WinRT应用程序中获取崩溃日志和堆栈跟踪? [英] How do I get crash logs and stack traces from WinRT apps written in C#?

查看:340
本文介绍了如何从用C#编写的WinRT应用程序中获取崩溃日志和堆栈跟踪?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用C#编写的Windows Store应用程序,但尚未发布到Windows Store。当我向测试团队提供正在开发的应用程序的调试版本时,它崩溃了,他们在哪里可以找到崩溃日志和堆栈跟踪?构建应用程序时,我需要做任何事情吗?我正在寻找标准解决方案,而不是不是第三方库或向我发送最终用户报告的工具。我来自一个Android世界,那里的ADB logcat总是包含Java堆栈跟踪,我正在寻找C#/ WinRt中的等效记录。

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.

推荐答案

故障转储将包含调用堆栈以及更多内容。

Crash dumps will contain the callstack and much more.

要收集故障转储,请首先执行以下regedit脚本:

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

第二,重现崩溃。

第三,通过执行以下命令停止崩溃转储回收:

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"=-

第四,从 C:\Temp\CrashDumps

在MSDN上的详细信息

这篇关于如何从用C#编写的WinRT应用程序中获取崩溃日志和堆栈跟踪?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆