NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I find what code is modifying a variable?

I have a weird one.

 

I am using the normal sequential model.

 

Something in my code is adding a property (container + string) to UUT.AdditionalData.  It's not the end of the world, but I can't pinpoint WHEN it's happening.

 

It's getting added between Pre-UUTLoop and Pre-UUT.

 

If I go to the model and put a breakpoint before Pre-UUT, there is no subProperty after PreUUT Loop runs.

 

When I clock STEP INTO on Pre-UUT, it's there.  Instantly.

 

I have searched for the property name in all my sequences, and I have found the code I wrote that creates it.  But that code runs well after this point.  I added a BP to it just to check and sure enough it happens later on.  (That step also creates a bunch of other variables, so that's not the code that's causing this).

It's POSSIBLE that I put this into labview code that's getting called, but there's no way it's running async and waiting for the engine to enter PreUUT.  And I checked the threads, there's two, but one is not running code (just used to launch an external utility and waits for it to exit).

Is there a way to block changes to a variable at runtime, and then have TS throw an error?  That would at least point me to what's trying to mod it.

0 Kudos
Message 1 of 3
(259 Views)

Did you customize your process model at all, or using any specialized model plugins?

0 Kudos
Message 2 of 3
(225 Views)

Maybe it doesn't exactly help, but if you define a watch for this object, you can define a breakpoint on value change.

 

0 Kudos
Message 3 of 3
(220 Views)