【问题标题】:Windows Mobile 6 SDK, cannot print debug logsWindows Mobile 6 SDK,无法打印调试日志
【发布时间】:2016-05-21 23:56:39
【问题描述】:

我目前正在为 PDA(一种 Windows Mobile 设备)开发应用程序。 我必须使用 Windows Mobile 6 SDK。

我想打印日志,就像任何Console Application 一样,但是在调用时:

System.Console.Writeline();
System.Diagnostics.Debug.WriteLine();

什么都没有发生... 我唯一能做的调试是写入文件,或通过MessageBoxes 显示信息

【问题讨论】:

    标签: c# debugging logging console windows-mobile-6


    【解决方案1】:

    Windows Mobile 6.x 不支持控制台。

    使用 System.Diagnostics.Debug.WriteLine();将该行打印到调试通道。您可以连接 Visual Studio(调试->附加到进程->智能设备->进程)。

    有一些 OEM 工具可以从调试通道读取,但这些工具也只是将调试输出重定向到文件。

    拥有持久日志的唯一方法是记录到文件。有关功能齐全的日志框架,请参阅 Log4Net。

    如果您需要实时监视,您可以将日志写入 TCP/IP 套接字,然后使用自定义工具从该套接字读取。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-08-30
      • 2011-04-19
      • 2021-11-27
      • 1970-01-01
      • 1970-01-01
      • 2016-04-07
      • 1970-01-01
      相关资源
      最近更新 更多