Admin Production ni-theme
Current Publication

DebugPrintf

LabWindows/CVI

DebugPrintf

int DebugPrintf (const char formatString[], ...);

Purpose

Similar to the ANSI C printf function, but writes output to the LabWindows/CVI Debug Output Window, when LabWindows/CVI is debugging the program. If the program is not being debugged, no output occurs.

(Linux) This function is not supported.

If another development environment is debugging the program, the output can appear in debugging output window of that development environments.

This function does not automatically append a newline character to the output.

Parameters

Input
Name Type Description
formatString const char [] The format string that specifies how subsequent arguments are converted for output.

The format string format is identical to the format supported by the ANSI C printf function. Refer to the documentation for the ANSI C printf function for information about the format.

If the format requires more arguments than the number of arguments passed to this function, the behavior is undefined. If the format is exhausted while arguments remain, the excess arguments are evaluated but are otherwise ignored.
source_s ... Specifies one or more arguments that are to be converted and written to the debug output window.

You must separate multiple arguments by commas.

Return Value

Name Type Description
CharactersWritten int The number of characters transmitted, or a negative value if an output error occurred.

Additional Information

Library: Utility Library

Include file: utility.h

LabWindows/CVI compatibility: LabWindows/CVI 5.5 and later

Example

Refer to compiler\int64\counter.cws for an example of using the DebugPrintf function.