Add Debug Messages (Compact 2013)
3/26/2014
You can use debug macros to send debug messages to the output stream based on whether you want these messages to appear in Debug, Checked, Retail, and Ship builds. Typically, the output stream appears in the Output window in Platform Builder. For more information on Debug, Checked, Retail, and Ship build types, see Design an OS.
The following table describes debug macros that control message printing. For a complete list of debug macros, see Debugging Macros.
Macro |
Description |
---|---|
In Debug and Checked builds, this macro calls NKDbgPrintfW to send a formatted debugging message to the output stream. In Retail and Ship builds, this macro does not send a message to the output stream. |
|
In Debug, Checked, and Retail builds, this macro calls NKDbgPrintfW to send a formatted debugging message to the output stream. In Ship builds, this macro does not send a message to the output stream. |
|
In Debug, Checked, and Retail builds, this macro calls NKDbgPrintfW to send a formatted error message to the output stream, adding the file name and line number where the error occurred. In Ship builds, this macro does not send a message to the output stream. |
|
In Debug and Checked builds, this macro asserts an expression, and, if the expression is FALSE, calls NKDbgPrintfW to send an error message to the output stream and calls DebugBreak to cause a breakpoint exception to occur in the current process. In Retail and Ship builds, this macro does neither of these actions. |
For guidelines that can help you make your debug message output more useful, see Debug Message Tips.