This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

How to Debug a LabWindows/CVI DLL from TestStand

Updated Mar 5, 2020

Reported In

Software

  • TestStand
  • LabWindows/CVI

Issue Details

I would like to be able to step into my LabWindows/CVI DLL from within TestStand. What changes do I need to make to my DLL and how do I configure the step in TestStand to step into the code?

Solution

Complete the following steps to debug a LabWindows/CVI created DLL from within TestStand by creating a debuggable DLL and configuring the LabWindows/CVI adapter:
  1. Compile a debuggable DLL in LabWindows/CVI.
    1. You can do this from within TestStand by selecting the step where the DLL is being called and then clicking on the Edit Code button in the Module Tab.
    2. From within LabWindows/CVI, select Build»Configuration»Debug to ensure a debuggable DLL will be created. 
    3. Build the LabWindows/CVI DLL.
      • In LabWindows/CVI 2013, select Build»Build.
      • In LabWindows/CVI 2012 and previous, select Build»Create [Debuggable] Dynamic Link Library.
  1. From within TestStand, select Configure»Adapters»LabWindows/CVI Adapter»Configureand select Steps in an External Instance of LabWindows/CVI option (requires LabWindows/CVI 6.0 or later). This will enable the steps to be executed in an external instance of LabWindows/CVI, allowing for debugging within the LabWindows/CVI environment. 

    Note: Make sure all the required files are included in the CVI project before stepping into the CVI debug build. For more information, refer to TestStand Help: Executing Code Modules in an External Instance of LabWindows/CVI.
  1. Place a breakpoint at the TestStand step where the DLL is called.
  2. Execute the sequence and when the execution pauses at the breakpoint, select Step Into to step into the code module.