TobyD Posted January 31, 2008 Report Share Posted January 31, 2008 I'm trying to debug a compiled LabVIEW dll. More specifically the dll that is built by the TestStand Sequence File Translator Example (text based LabVIEW version of the example) that ships with TS 4.0. I have recompiled the dll with Enable Debugging and Wait for debugger on launch enabled in the build specifications. I then launch the Debug Application or Shared Library window from LabVIEW (in the Opertate menu) and run TestStand (which calls the dll). Nothing happens - the dll runs as expected but I am not able to connect to it for debugging. I have never used the Debug Application or Shared Library functionality and I'm not sure if I'm doing something wrong or if this is even possible (although the help files lead me to believe it should work). Any nudges in the right direction? Quote Link to comment
TobyD Posted February 5, 2008 Author Report Share Posted February 5, 2008 QUOTE(TobyD @ Jan 30 2008, 10:15 AM) I'm trying to debug a compiled LabVIEW dll. More specifically the dll that is built by the TestStand Sequence File Translator Example (text based LabVIEW version of the example) that ships with TS 4.0.I have recompiled the dll with Enable Debugging and Wait for debugger on launch enabled in the build specifications. I then launch the Debug Application or Shared Library window from LabVIEW (in the Opertate menu) and run TestStand (which calls the dll). Nothing happens - the dll runs as expected but I am not able to connect to it for debugging. I have never used the Debug Application or Shared Library functionality and I'm not sure if I'm doing something wrong or if this is even possible (although the help files lead me to believe it should work). Any nudges in the right direction? I finally got it working so I thought I'd answer my own question here in case anyone needs it in the future... Before compiling the DLL, set Enable Debugging to true in the build specifications and set breakpoints near the beginning of any functions that you want to debug (or set Wait for debugger on launch to open all functions for debugging). Compile the DLL and move the DLL and all support files to the directory from which the DLL will be called (you can also build your project directly to the calling directory). From any LabVIEW project/application select Operate --> Debug Application or Shared Library... Run the program that calls your DLL (in my case this was TestStand) Push the Refresh button in the shared library debugger and you should be able to select your DLL from the list and debug Step 2 is what had me stuck. Apparently the ini file tells the DLL to run in Debug mode so it has to be in the same folder that the DLL is being called from. Thanks to James Ramsey of NI for helping me out on this one. Quote Link to comment
HY Chen Posted June 9, 2021 Report Share Posted June 9, 2021 (edited) Seeking to debug a LabVIEW dll project and then saw this article. Thanks from 13 years later! Peter Edited June 9, 2021 by HY Chen Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.