Share via


debugPrintf

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Framework library function that writes a null-terminated byte-string to the active debugger via the Windows SDK function OutputDebugStringA. If the application has no debugger, the system debugger displays the string. If the application has no debugger and the system debugger is not active, debugPrintf does nothing.

This function does not return a value.

void WINAPI debugPrintf(LPSTR lpFormat, arguments);

Parameters

lpFormat (LPSTR)

The format string, which follows the syntax and rules for that used with the sprintf function.

arguments

Zero or more arguments to match the format string.

Example

This function prints a string to show that control was passed to it. The _DEBUG flag must be defined before compiling or else this function does nothing.

\SAMPLES\EXAMPLE\EXAMPLE.C

short WINAPI debugPrintfExample(void)
{
#ifdef _DEBUG
   debugPrintf("Made it!\r");
#endif
   return 1;
}

See Also

Concepts

Functions in the Framework Library