03-07-2012 10:53 AM
In my LabVIEW applications, I've been using the Win32 debugger by calling the OutputDebugString() using a Call Library Function Node just like described here. This has worked great for applications run in LabVIEW. Recently I built a VI into a DLL and called it from CVI, and the debug messages no longer show up in the debugger output. The Call Library Function Node does not produce an error or anything. I've tried multiple debugger applications, and am showing messages from all processes.
Any ideas?
Thanks in advance,
Joe
03-07-2012 01:27 PM
Here's some more info: In CVI, if I open the Debug Output window (Window->Debug Output) the debug messages do indeed show up here. But they dont show up in any viewer (DebugView, Trace Spy, Hoo WinTail, etc).
Also, if I use the OutputDebugString() function directly in CVI, the debug message shows up in the Debug Output window, but not in any of the viewers, as it should. It looks like CVI is intercepting these messages somehow, before they can get to the Windows SDK.
Since this looks like a CVI issue, I'll post in the CVI forum.
03-09-2012 02:06 AM - edited 03-09-2012 02:07 AM
CVI indeed attaches to the debug output. Since it is the first to get a chance to do that for its own process it will effectivly disconnect any other debugger from that output for anything that is executed in CVI. Windows has some serious limitations in terms of piping streams in comparison to Unix systems, and this is one of them.
But what is wrong about the CVI Debug Window? You do get the information in there so it seems possible to do debugging of your LabVIEW DLL in CVI.