Solution
his article shows three TestStand‑native ways to monitor a variable live during execution without creating external code modules:
- Manually add Watch Expressions
- Programmatically add/remove Watch Expressions
- Show live values in the UI status bar using UIMsg_ProgressText
Option 1 — Manually Add Watch Expressions
This option is best for quick debugging. Use the built‑in Watch View to observe variables in real time.
Steps
- Open your sequence in the Sequence Editor.
- Select Debug >> Breakpoints/Watches… >> Watch Expressions tab.
- Click Add, enter an expression such as FileGlobals.MyVar. The other settings are optional. Review the reference documentation at the end of this section for detailed information on each setting.
- Click OK, then Done.
- Run the sequence and observe live updates in the Watch View since the beginning of the execution. No breakpoint needed.
Tips
- Add multiple watches for complex debugging scenarios.
- Because Watches evaluate standard TestStand expressions, you can monitor more than simple variables — you can also observe calculated values, conditional expressions, and other logic in real time. This provides a powerful way to validate how an expression behaves during execution before adding it directly to your sequence.
References
Option 2 - Programmatically Add / Remove a Watch Expression
This option provides greater flexibility when you want a sequence to automatically create and remove a watch expression. You can place the Statement steps in the Setup and Cleanup groups of MainSequence, or inside Process Model Callbacks that run before and after MainSequence—such as ProcessSetup, PreUUT, PreMainSequence, PostMainSequence, PostUUT, and ProcessCleanup. By choosing where these statements execute, you control exactly how long the watch expression remains active.
Create Watch Expression (Statement Step):
// Create a Teporary Global Variable that won't persist after you close TestStand.
RunState.Engine.TemporaryGlobals.NewSubProperty("WatchExp", PropValType_Reference, False, "", PropOption_DoNothingIfExists),
// Insert a new WhatExpression object in the WatchExpressions list and store it in the Temp Global.
RunState.Engine.TemporaryGlobals.WatchExp = RunState.Engine.GetWatchExpressions().Insert(Nothing, RunState.SequenceFile, True),
// Update the Expression
RunState.Engine.TemporaryGlobals.WatchExp.AsWatchExpression.Expression = "FileGlobals.MyVar"
Remove Watch Expression (Statement Step):
//Remove the Expression by Passing the reference created at Setup
RunState.Engine.GetWatchExpressions().Remove(Locals.WatchExp)
The screenshot below shows one example implementation where the steps are implemented in the MainSequence.

References
Notes & Caveats
- This might be excessive. If you’re requirement is simple, consider adding/removing watch expressions manually.
- If your sequence can abort early, consider removing the watch in the SequenceFileUnload engine callback.
- Watches require a Watch View (present in the Sequence Editor and full-featured UIs).
- Tracing needs to be enabled in the Station Options dialog.
Option 3 — Display Live Values in the Status Bar
If you want a simpler, unobtrusive display, that works even when tracing is disabled, you can post dynamic text to the status bar using a UI Message — all from an expression.
Steps
- Override SequenceFilePostStep Engine Callback, or add it to the PostExpression of a step if you only want to update it a certain moments of the execution.
- Add a Statement step with:
RunState.Thread.PostUIMessageEx(UIMsg_ProgressText, 0, "FileGlobals.MyVar = " + Str(FileGlobals.MyVar), Nothing, False)
What this does?
- Posts a UI Message of type UIMsg_ProgressText.
- The Sequence Editor and full-featured UIs automatically display it in the status bar.
References