LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW debugging sometimes does not work when running as code module in TestStand

Hello,

 

I have recently started to face issue with debugging of LabVIEW code modules in LV 19 when used with TS 19. What happens is that either breakpoints sometimes do not work or sometimes if they do, I cannot single step in VIs. Also, probe data is not available in LabVIEW even when retaining wire values - I see only text "No debug info" when checking the values by probes. I am not sure why this is the case, since the debugging is enabled in VIs. Any ideas what might cause that VIs cannot be debugged when run from TestStand?

0 Kudos
Message 1 of 8
(1,123 Views)

I've noticed sometimes that TestStand will launch a fresh copy of the VI i'm trying to debug (sorry for the bad description; but think of it like a clone).  If I set-up probes & breakpoints before running my sequence, the probes don't contain any data & the breakpoints don't trigger.  

Instead, it is more reliable to set a breakpoint in TestStand, step into the VI (F8 key), and then setup probes & continue execution.  I use 2017 TestStand though...

0 Kudos
Message 2 of 8
(1,083 Views)

Make sure you are opening VIs only from TestStand when TestStand is open.  I think that you can open them from the project if you unload the modules first, but if you don't do it right, it can lead to VI corruption.  The easiest thing to do is to limit yourself to opening it from TestStand when TestStand is open.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 8
(1,078 Views)

Ensure your VIs are non-reentrant. If your VIs are re-entrant, it is expected that TS will launch a new clone instead of using the VI you've opened and placed a breakpoint.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 8
(1,071 Views)

And I'll add another tidbit.

 

If your vi is in a lvproj and you don't call it through the project in teststand it opens directly though the LabVIEW proxy caller in the teststand application context rather than a proxy call to the project context in the teststand application.  Obviously then, nothing you do to the vis in the project context reflects in the teststand module.

 

<Buff chest await applause>


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 8
(1,059 Views)

@JÞB wrote:

And I'll add another tidbit.

 

If your vi is in a lvproj and you don't call it through the project in teststand it opens directly though the LabVIEW proxy caller in the teststand application context rather than a proxy call to the project context in the teststand application.  Obviously then, nothing you do to the vis in the project context reflects in the teststand module.

 

<Buff chest await applause>


This is probably why I experience different behavior during debug efforts.  Some Vi are in projects, some in packed libraries, some are just stand alone.

0 Kudos
Message 6 of 8
(1,056 Views)

@proland1121 wrote:

@JÞB wrote:

And I'll add another tidbit.

 

If your vi is in a lvproj and you don't call it through the project in teststand it opens directly though the LabVIEW proxy caller in the teststand application context rather than a proxy call to the project context in the teststand application.  Obviously then, nothing you do to the vis in the project context reflects in the teststand module.

 

<Buff chest await applause>


This is probably why I experience different behavior during debug efforts.  Some Vi are in projects, some in packed libraries, some are just stand alone.


Assuredly!   A library member knows it is part of a library and MUST open in the context of the library (packed or not.)   Project items do not know they can be called by a project and may open in any project context or in the main application context. 

 

You can inspect the context ring control at the lower left panel edge to see what the current context is or even switch context if the item is open in more than one context.


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 8
(1,053 Views)

@JÞB wrote:

@proland1121 wrote:

@JÞB wrote:

And I'll add another tidbit.

 

If your vi is in a lvproj and you don't call it through the project in teststand it opens directly though the LabVIEW proxy caller in the teststand application context rather than a proxy call to the project context in the teststand application.  Obviously then, nothing you do to the vis in the project context reflects in the teststand module.

 

<Buff chest await applause>


This is probably why I experience different behavior during debug efforts.  Some Vi are in projects, some in packed libraries, some are just stand alone.


Assuredly!   A library member knows it is part of a library and MUST open in the context of the library (packed or not.)   Project items do not know they can be called by a project and may open in any project context or in the main application context. 

 

You can inspect the context ring control at the lower left panel edge to see what the current context is or even switch context if the item is open in more than one context.


That's what I was trying to get at, but your post was so much more elegant and actually included how to deal with it.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 8
(1,042 Views)