Suh*_*iev 3 c++builder c++builder-2010
我总是使用Breakpoint来调试我的项目源代码......真的不知道如何在c ++ builder 2010中打印调试消息!怎么做 !!!
您可以使用以下WinAPI功能:OutputDebugString("I am a debug message").
此外,您还需要查看调试器选项,并查看是否启用了"输出消息"选项.
要从发布应用程序中排除调试消息传递代码,可以使用以下宏.
#ifndef _DEBUG
#define DEBUG_MESSAGE //
#endif
#ifdef _DEBUG
#define DEBUG_MESSAGE(msg) OutputDebugString("msg")
#endif
Run Code Online (Sandbox Code Playgroud)
然后DEBUG_MESSAGE("I am a debug message")在你的代码中使用.
| 归档时间: |
|
| 查看次数: |
6590 次 |
| 最近记录: |