Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
4 rating:
 1.5 out of 5     Rate this Document

How to Step Into a Visual Studio .NET Assembly or C++ DLL from TestStand

Primary Software: TestStand
Primary Software Version: 3.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I have .NET assemblies or C++ DLLs that I am calling from TestStand. How can I automatically launch Visual Studio when I step into a these code modules from TestStand?

Solution:
In order to launch Visual Studio when you step into a .NET or C++ DLL code module from TestStand you need the following:
  • TestStand v3.0 or later
  • Microsoft Visual Studio 2003 or later
  • Measurement Studio Enterprise Edition

Measurement Studio Enterprise Edition includes NI TestStand .NET integration. This NI TestStand .NET integration will launch Visual Studio when you step into your .NET assembly or C++ DLL.

Follow the steps below to debug a .NET assembly or C++ DLL in TestStand using Visual Studio:

  1. Launch TestStand and place a code module calling a .NET assembly or C++ DLL. Define the source files containing the method or function you are calling.
  2. Place a breakpoint next to the code module calling the .NET assembly. To do this, simply highlight the code module and select Debug » Toggle Breakpoint (or pressing F9) from the menu bar.
  3. Execute the sequence by pressing the green arrow in the toolbar (or Execute » Test UUTs).
  4. When the breakpoint next to the code module calling the .NET assembly is reached, select Debug » Step Into (or press F8) from the menu bar.

This will launch Visual Studio automatically. When Visual Studio is launched, the .NET assembly or C++ DLL that you stepped into will be loaded and you can then debug your code module using Visual Studio. Refer to Chapter 5, Module Adapters, of the NI TestStand Reference Manual for more information about using the .NET Adapter with Visual Studio.

Note: If you are using Visual Studio 2003 then these Instructions are only valid for versions of TestStand prior to 4.0. In order to debug using a later version of TestStand, you must upgrade your version of Visual Studio.




Related Links:

Measurement Studio Home Page
KnowledgeBase 41QA7PT3: Debugging a Visual Studio DLL from TestStand



Attachments:





Report Date: 03/29/2005
Last Updated: 02/19/2009
Document ID: 3JSBDH1J

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit