LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging a C++ dll from LabVIEW - is it possible to debug both in labVIEW and then in the C++ environment, say Visual Studio?

Hello all,
 
What I want to get a feel for is how easy it is to set up the ability to debug code both in labVIEW AND in a C++ compiler, say Visual Studio.
 
If we have a situation where we have a c++ dll which we are accessing from labVIEW is it possible to attach the process so that you can set breakpoints in both environments. Hence run labVIEW app and when dll gets called hit a Visual Studio breakpoint?
 
This is a new area to me and I have not found anything regarding debugging. Any comments would be appreciated.
 
Regards
 
Kevin
0 Kudos
Message 1 of 3
(5,872 Views)

Hi,

  you don't say whether you're actually using Visual Studio, or if it's .net or borland or something enirely different, but the principal holds for all that allow external debugging capability.

You need to set labview.exe as the external process to run for your dll project, and then load up the .vi in labview that calls it. You then have the debugging features of LabVIEW (since you're in that environment) and when LabVIEW calls the DLL (must be made debuggable), the c++ environment is effectively running LabVIEW in it's memory space, so it will honour all the breakpoints in the c++ project code as they get called.

For Visual Studio 6.0 c++, have a look here :

http://windowssdk.msdn.microsoft.com/en-us/library/ms164704.aspx

and here

http://windowssdk.msdn.microsoft.com/en-us/library/605a12zt.aspx

Hope that helps

Sacha Emery
National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
Message 2 of 3
(5,863 Views)

Hi,

Thanks SachaE for the explanation. In addition to that it might be useful to show the calling VI during the LabVIEW call (in case a sub VI does the call) + set a breakpoint onto the DLL call.

0 Kudos
Message 3 of 3
(4,111 Views)