在 Windows RT 应用程序中哪里可以找到调试消息?

Where to find debug messages in Windows RT app?

我是 Win RT 开发的新手,我目前正在开发一个 windows RT 应用程序,我已将我的应用程序的调试版本发送给测试人员。我想知道在哪里可以找到调试消息的输出?是否可以将调试输出重定向到文件?

我假设你使用 system.diagnostics.debug 来输出调试信息。

在桌面版.NET中,您可以添加Debug.Listeners来捕获日志并输出到文件。但在.NET for Store App 中,您无法添加文件侦听器。

另一种记录方式是使用 ETW(Windows 的事件跟踪)。

代码示例:Logging Sample for Windows Store Apps (ETW Logging in WinRT)

博客HOW TO WRITE LOG FILES IN WINDOWS STORE APPS也介绍了几种登录Windows应用商店的方法。