LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Win32 debugger (using OutputDebugString()) doesn't work when VI is built into a DLL?

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

0 Kudos
Message 1 of 3
(3,746 Views)

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.

0 Kudos
Message 2 of 3
(3,741 Views)

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.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 3
(3,723 Views)