NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging Visual Studio C++/C# dlls using Teststand

Hi,
 
I know that I can debug my Visual Studio .NET based C++/C# dll's using Teststand 4.0.1 when Measurement Studio is also installed. I believe this is through the NI Teststand .NET integration provided by Measurement Studio.
 
I was interested in finding out if it would be possible to debug my Visual Studio 2005 .NET based dll's without having Measurement Studio installed at all and just using Visual Studio 2005 and Teststand 4.0.1?
 
Thanks in advance
 
0 Kudos
Message 1 of 6
(8,348 Views)

Hi Schadenfreud,

It looks like we have a knowledge base article here that describes an answer to your question. As you mentioned, here (also a related link from the first KnowledgeBase link) is the recommended method for doing this which uses Measurement Studio.

To find these articles I searched "debug dll teststand" at ni.com.

Please let me know if these KnowledgeBases are not a sufficient answer to your question.

With warm regards,

David D.
0 Kudos
Message 2 of 6
(8,321 Views)

Hi David,

The options provided for Visual Studio 2005 in the knowledgebase article "Debugging a Visual Studio .NET Assembly from TestStand" are not visible in MS Visual C# 2005 Express edition. There is no 'Start External program' option in the debug tab of MS C# 2005 express and so I can't try this solution out. Any idea if the debugging from teststand would work even if the MS 'Express' 2005 editions are used?

Also, the second article "How to Step Into a Visual Studio .NET Assembly or C++ DLL from TestStand" mentions that the following are required for debugging.

  • TestStand v3.0 or later
  • Microsoft Visual Studio 2003 or later
  • Measurement Studio Enterprise Edition

As the first article makes no mention of Measurement Studio, I'm confused whether Measurement Studio is required or not for debugging Visual Studio code through Teststand?

Thanks!

0 Kudos
Message 3 of 6
(8,314 Views)
Measurement Studio is not strictly required for debugging .NET code from TestStand, but it does give you a few abilities that you wouldn't otherwise have.
 
Without MeasurementStudio, the easiest way to debug your code will be to go to Debug>>Attach to Process.  This will give you a list of the running processes on your machine, and allow you to attach the Visual Studio debugger to them.  If you are using the sequence editor, its process is named SeqEdit.exe.  Once the assembly has been loaded by the process you are attached to, you can set breakpoints in your code to debug it.  Note however that if you click Stop Debugging, since the sequence editor is a .NET program, it will be stopped, so make sure you save your work often!
 
With Measurement Studio, you can still use the above process to debug, but you also get several more features:
  1. You can step into and out of code from the TestStand process.
  2. Communication between Visual Studio and the TestStand User Interface.  For instance, clicking continue in Visual Studio would also continue in TestStand and if you click Stop Debugging, a warning would appear that you could loose work.
  3. There are several other enchancements to Visual Studio integration, such as code creation.
Josh W.
Certified TestStand Architect
Formerly blue
0 Kudos
Message 4 of 6
(8,300 Views)

Hi Schadenfreud,

Josh has given you a lot of great information (thanks Josh!), I just wanted to chime in to answer your question about Visual Studio Express.

From the TestStand 4.0.1 release notes (under Recommneded System Requirements):

"TestStand supports Microsoft Visual

Studio Standard but does not support Microsoft Visual Studio Express."

Let us know if you have any more questions!

With warm regards,

David D.
0 Kudos
Message 5 of 6
(8,295 Views)

I'd like to add that the reason that TestStand and Measurement Studio do not support integrating with Visual Studio Express Editions is that Microsoft does not support 3rd party tools integrating into Visual Studio Express. That is, they do not license us to use the automation APIs that we need to use to provide functionality within the Express environments.

This point aside, you can use Visual Studio Express Editions to create code modules that can be called just fine from TestStand. From the TestStand perspective, this is the same as if you used no IDE and instead used the VB.NET or C# compilers from the .NET SDK directly.

David Rohacek
National Instruments

0 Kudos
Message 6 of 6
(8,274 Views)