LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Restore DbgPrintf help page

Back in the day there was a separate short page for this Manager function, but now after switching to the new help system both offline and online help lack it completely. Here's the contents from LabVIEW 2009 help:

Debugging External Code

LabVIEW has a debugging window you can use with external code to display information at run time. You can open the window, display arbitrary print statements, and close the window from any CIN DLL.

To create this debugging window, use the DbgPrintf function. The format for DbgPrintf is similar to the format of the SPrintf function. DbgPrintf takes a variable number of arguments, where the first argument is a C format string, as shown in the following example:

int32 DbgPrintf(CStr cfmt, ..);

The first time you call DbgPrintf, LabVIEW opens a window to display the text you pass to the function. Subsequent calls to DbgPrintf append new data as new lines in the window. You do not need to pass in the newline character to the function. If you call DbgPrintf with NULL instead of a format string, LabVIEW closes the debugging window. You cannot position or change the size of the window.

The following examples show how to use DbgPrintf:

DbgPrintf(""); /* print an empty line, opening the window if necessary */
DbgPrintf("%H", var1); /* print the contents of an LStrHandle (LabVIEW string-->, opening the window if necessary */
DbgPrintf(NULL); /* close the debugging window */

I suggest restoring it (and maybe adding to SPrintf, SPrintfp, PPrintf, PPrintfp, FPrintf, LStrPrintf family) because:

- it's useful sometimes for DLL debugging purposes;

- it's a stable function, I can't remember any bugs related to it over the years;

- it's simple and easy to use;

- it's contained inside extcode.h;

- it has a counterpart in LabWindows/CVI that is documented.

0 Kudos
Message 1 of 1
(576 Views)