Jump to content

Debugging a compiled LabVIEW dll


Recommended Posts

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?

Link to comment

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...

  1. 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).
  2. 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).
  3. From any LabVIEW project/application select Operate --> Debug Application or Shared Library...
  4. Run the program that calls your DLL (in my case this was TestStand)
  5. 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.

Link to comment
  • 13 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.