_CrtDbgReportW 在 Windows Mobile 中的哪里输出?
我正在使用 ASSERTE 宏来检查先决条件。 根据其定义,它使用 ASSERT_BASE,而 ASSERT_BASE 又调用 _CrtDbgReportW 来打印消息。 _CrtDbgReportW 输出到哪里?
我假设如果应用程序是从调试器启动的,它将进入调试器窗口。 如果不在调试器下,消息会去哪里?
I am using ASSERTE macro to check for pre-conditions. According to its definition it is using ASSERT_BASE, which in turn calls _CrtDbgReportW to print out the message. Where does _CrtDbgReportW output goes to?
I would assume that if the application is started from debugger, it would go to debugger window. Where would the messages go if it is not under debugger?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
_CrtDbgReportW 的输出取决于您的设置方式起来吧。 默认情况下,它将其发送到 OutputDebugString API。
调试器捕获 OutputDebugString 输出,并通常按照您的建议将它们显示在调试器窗口中。
还有一些可以捕获输出的应用程序,例如您可以使用的 DebugView对于 PC 应用程序。
更新:我错过了 Windows Mobile 部分。 我仍然相信它输出到 OutputDebugString 但我不知道有任何第三方应用程序可以工作。 我知道在 Windows Mobile 下捕获 OutputDebugString 输出的唯一方法是使用 调试功能 DebugActiveProcess / WaitForDebugEvent 捕获 OUTPUT_DEBUG_STRING_EVENT 事件并将其写出某处。
The output for _CrtDbgReportW depends on how you set it up. By default it sends it to the OutputDebugString API.
Debuggers trap the OutputDebugString output and normally display them in the debugger window as you suggest.
There are also applications that trap the output like DebugView that you can use for PC applications.
Update: I missed the Windows Mobile bit. I still beleave that it's output to the OutputDebugString but I don't know of any third party application that works. The only way I know of to trap the OutputDebugString output under Windows Mobile is to use the Debugging Functions DebugActiveProcess / WaitForDebugEvent to trap the OUTPUT_DEBUG_STRING_EVENT events and write them out somewhere.