Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道我可以配置 Windows Phone 8 为正在开发的应用程序生成故障转储的方法?
我知道我们可以访问发送到 MS 应用商店的转储,但我需要一个仍在开发中的应用程序的转储。
谢谢
在“App.xaml.cs”类中,您将找到一个名为“Application_UnhandledException”的方法。每当您的应用由于未处理的异常而崩溃时,都会启动此方法。在事件 args 中,您将找到错误消息、堆栈跟踪等...
在此处添加您的逻辑以转储崩溃(例如,发送电子邮件或将日志存储在数据库中等...)
顺便说一句,如果异常是可恢复的,您可以处理错误并且不要关闭将 Handled 变量设置为 true 的应用程序:
// Recover from the error e.Handled = true;