NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Remote debugging VIs in TestStand 2014 SP1 with RTE

I was having a look at the TestStand 2014 SP1 "What's new" list, and saw this little gem:

 

  • Capability to debug and trace VIs that TestStand executes using the LabVIEW Run-time Engine 2015 or later

This seemed like it would be pretty helpful to me.  I'm currently trying to set up a station model where we use TestStand 2014SP1 with the LabVIEW 2015 RTE and never have a live LabVIEW install on the deployed computer if we can avoid it.  

 

I gave it a try.  It seemed to work somewhat like LabVIEW remote debugging did for compiled EXEs, but there was a snag.  On my test VIs that show their front panel and wait for input, I see the window appear on my remote debug PC (running LabVIEW 2015 developer's edition) and I can control it from there, view the block diagrams, set probes, step through, and so on.

 

However, the thing about TestStand is that many of the VIs I call are just quick routines to open files or send one query-response to hardware.  Therefore they don't open their front panel, and even if I force them to do so by clicking the option in the TestStand editor, they close immediately before the debug application has time to open it and let me set any probes of any kind.  I have to open the VI over the network, and alter the VI somehow (set breakpoints, or add a 10 second timer before running any code to give me time to open the block diagram and hit the pause button).  This seems unnecessary, and also tedious if I have 10+ VIs and I want to debug each in turn if I don't know where the problem comes up.

 

The best thing I have come up with as a solution to this problem is a SubVI that I stick at the start of each VI that TestStand calls.  If the SubVI detects that someone has connected to the debug server and that its calling VI has its front panel open, it adds a 10 second delay. Otherwise it executes immediately.  This way, if I have a sequence of 10+ quick and automaticVIs and I want to debug the middle 3, I can toggle the "Show front panel" option on just those three, save the sequence, connect the debug client, and then run the sequence and then I can trace those three with the rest running as normal.  As soon as I disconnect the debug client they all go back to normal.

 

However this seems like kind of a weird hack and I feel certain that there has to be a better way to acomplish this.  When debugging a compiled EXE in this manner I can just open enough nested VIs to get to the one I want to add probes or breakpoints to before I allow it to run, but since TestStand VIs under the RTE don't have a "main VI" that everything runs under, this isn't the case.

 

Is there some option flag somewhere that I am missing to make this easier?

0 Kudos
Message 1 of 3
(3,779 Views)

Hi Kyle97330,

 

There isn't a way to set an option flag that I know of, but you can create a DLL for the VI and debug remotely using that as seen here:

 

http://ae.natinst.com/public.nsf/web/searchinternal/be0a6e711d3f84b786257610005dbfb7?OpenDocument

Justin M.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 3
(3,745 Views)

Step 3 in this TestStand Help Topic can also be of use:

 

Debugging Code Module VIs with LabVIEW

http://zone.ni.com/reference/en-XX/help/370052P-01/tslabview/infotopics/debuggingwithlv/

Michael L.
Sales Engineer
National Instruments
0 Kudos
Message 3 of 3
(3,551 Views)