NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Terminate at breakpoint but execute cleanup

Solved!
Go to solution

At a TestStand step breakpoint I sometimes realize that the sequence is not going to work and I need to make a change.

 

Is there a way to go to cleanup from a breakpoint? I have an object that needs to be closed or my system is left in a bad state.

0 Kudos
Message 1 of 5
(1,052 Views)

Since you are manually interacting with the Sequence Editor anyway, the easiest way is probably just to close the execuiton window (see below)

 

Oli_Wachno_0-1691731224434.png

Oli_Wachno_1-1691731238852.png

 

0 Kudos
Message 2 of 5
(1,031 Views)

So closing the window this way runs cleanup?

0 Kudos
Message 3 of 5
(1,006 Views)
Solution
Accepted by topic author stephenb2

@stephenb2 wrote:

So closing the window this way runs cleanup?


Kind of...

More precisely:

Terminating an execution always runs cleanup sections. So if you are using exactly this way, your cleanup sections will be executed

 

Side note: you might be wondering, why you don't see the tracing while terminating and if you're setting a breakpoint in a cleanup section won't show any effect while terminating. This is due to the following default settings:

 

Oli_Wachno_0-1691992686543.png

 

 

 

0 Kudos
Message 4 of 5
(985 Views)

Thanks for the suggestion. I can see that the cleanup steps get executed after termination with the station options for tracing set up this way.

0 Kudos
Message 5 of 5
(955 Views)