Debugging .NET Assemblies
- Updated2024-11-26
- 2 minute(s) read
Debugging .NET Assemblies
To debug a .NET assembly, first create the assembly with debugging enabled in the ADE. Then, launch the sequence editor or user interface from Microsoft Visual Studio or attach to the sequence editor or user interface process from Visual Studio.
When you use a supported version of Visual Studio and you suspend a sequence on a step that calls a debuggable assembly, click the Step Into button in TestStand to suspend Visual Studio at the first statement in the assembly method or property.
When you attempt to step into an assembly while Visual Studio is not attached to the TestStand process, TestStand launches Visual Studio, which automatically attaches to the TestStand process using managed and native debugging. When you debug managed code in a TestStand process with Visual Studio, TestStand does not unload assemblies when you select File»Unload All Modules.
(Windows 10/8.1/7) When you launch Visual Studio from TestStand, Visual Studio runs with the same privileges you used to run TestStand. For example, 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.
- Save sequence files and workspaces before you stop debugging and terminate the TestStand process because Visual Studio might terminate the process without prompting you to save modified files in TestStand.
- You must attach Visual Studio to the TestStand process correctly depending on the type of code module you want to debug. For .NET code modules, NI recommends using only managed debugging when attaching Visual Studio.
- When you use LabWindows/CVI to debug a DLL in the TestStand process, you cannot debug a .NET assembly at the same time. When you use Visual Studio to debug an assembly in TestStand and you want to use LabWindows/CVI to debug code modules at the same time, you must configure the LabWindows/CVI Adapter to execute the steps in an external instance of LabWindows/CVI.