|Download Help (Windows Only)|
To debug a DLL TestStand calls, first create the DLL with debugging enabled in the ADE. Then, launch the TestStand Sequence Editor or TestStand User Interface executable from the ADE or attach to the sequence editor or user interface process from the ADE, when supported.
To build a debuggable shared library in the LabVIEW development system, you must configure the shared library to enable debugging in the build specification for the shared library before building the shared library. Using the LabVIEW development system, you can then connect to the TestStand application process that loads and calls the VIs in the debuggable shared library.
Select Run»Select External Process in the Project window to identify the executable for the sequence editor or user interface and select Run»Debug <executable name> to start debugging the executable. For Visual Studio, you must enable native code debugging.
When you suspend a sequence on a step that calls a debuggable DLL, click the Step Into button in TestStand to suspend at the first statement in the DLL function within LabWindows/CVI or Microsoft Visual Studio.
To step into a code module with LabWindows/CVI, you must configure the step to use the LabWindows/CVI Adapter. You can step into a code module when you configure the LabWindows/CVI Adapter to execute steps in-process or in an external instance of LabWindows/CVI.
The LabWindows/CVI debugger automatically attaches to a TestStand process when you perform a step into operation on a LabWindows/CVI Adapter step. If the LabWindows/CVI DLL is debuggable and the source code is available, LabWindows/CVI suspends the process in the called DLL function; otherwise, TestStand performs a step over operation. You do not need to launch the Sequence Editor from LabWindows/CVI to access the debugger or choose to attach the debugger to an existing process.
|Note You must be using LabWindows/CVI 2015 SP1 or later for the debugger to automatically attach to a TestStand process.|
To step into a DLL directly from TestStand into a supported version of Visual Studio, you must configure the step to use the C/C++ DLL Adapter. When you attempt to step into a DLL while Visual Studio is not attached to the TestStand process, TestStand launches Visual Studio, which automatically attaches to the TestStand process using native debugging.
When you launch Visual Studio from TestStand, Visual Studio runs with the same privileges you used to run TestStand. If you launch TestStand while logged in as a user with standard privileges and then you launch Visual Studio from TestStand, you cannot execute tasks in Visual Studio that require administrator privileges. Refer to the LabWindows/CVI and Visual Studio documentation for more information about debugging DLLs in an external process.
Chapter 12, Calling LabWindows/CVI Code Modules, of the Getting Started with TestStand manual