LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

unexpected output in DebugPrintf

Solved!
Go to solution

Hello,

today I used the DebugPrintf command to compare two different numbers obtained by two different routines and was quite surprised to not only see these two numbers: before that line there were several lines of text, see attached screenshot.

Where do these text lines come from and what do they mean?? Definitely it is not from my code...

Thanks in advance!

DebugPrintf.png

 

0 Kudos
Message 1 of 6
(3,374 Views)

No, it's not your code!

As far as I can understand some system or CVI library has some debug output that is trapped by CVI IDE and shown in Debug Window. Similar debug messages are added by each call to FileSelectPopup and FileSelectPopupEx. AFAIK there is no way to exclude prevent them from appearing in the debug window



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 6
(3,292 Views)

Thanks, Roberto, this also was my understanding - so why does CVI capture debug output from 'outside' system processes since this information seems not useful for us users?

0 Kudos
Message 3 of 6
(3,268 Views)

It's possible that CVI declares itself as a debugger for every existing process; the symmetric of it is that debug messages from CVI executables can be captured by external applications like DebugView.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 6
(3,146 Views)
Solution
Accepted by Wolfgang

so if there is no way to prevent all these "other" messages the solution for me is to not use DebugPrintf but use printf instead

0 Kudos
Message 5 of 6
(3,030 Views)

Indeed if you are callikng FileSelectPopupEx your debug window will be flooded with error messages that you cannot avoid. For this reason I sometimes tailored my code this way:

#ifdef _CVI_DEBUG_
	r = FileSelectPopup (...);
#else
	r = FileSelectPopupEx (...);
#endif
if (r == VAL_NO_FILE_SELECTED) return 0;

in order to give the final user the up-to-date look and feel of FileSelectPopupEx avoiding to be bothered while developing 😉



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 6 of 6
(3,008 Views)