WatchExpression
- Aktualisiert2025-07-21
- 1 Minute(n) Lesezeit
WatchExpression
Use objects of the WatchExpression class to monitor the values of properties and variables using expressions. Typically, you use WatchExpression objects to display run-time values in a Watch View pane in a user interface. A WatchExpression object defines an expression TestStand evaluates during sequence execution.
You can configure a conditional breakpoint on a watch expression. The breakpoint suspends execution when a value of the watch expression changes, or whenever the coerced value of the watch expression evaluates to True . The TestStand Engine maintains a list of watch expressions and evaluates conditional breakpoints during execution.
You can also specify the scope of the watch expression, which specifies whether the expression applies to all executions of the client sequence file or only the current execution, and whether to evaluate the watch expression only when executing within a specific sequence file or sequence.
Use the collection object the Engine.GetWatchExpressions method returns to manage a watch expression list. You can create new watch expressions by using the WatchExpressions.Insert method, which adds a new watch expression to the collection and returns the new object. To add a watch expression to the list the engine maintains and monitors, pass True for the insertInEngine parameter.