Watches |
A Watch is a debugging feature used for examining the state of variables and other expressions within a running task. A watch can simply be the name of a variable. For example, to watch the value of a variable named TotalCount, add a watch that contains simply %TotalCount%. Embedded expressions can also be used within a watch, using the same syntax as a standard Automate embedded expression. For example, to watch the length of an Automate variable named myName, add a watch %Len(myName)%.
The Watches debug panel allows you to add, remove or modify items to watch. It displays the list of added watches and updates their value as the task runs. This way, watches can be re-evaluated after each task step is executed. Watches are mainly used for debugging, therefore, they are ignored when a task is executed as a result of a trigger or executed manually from the Task Administrator.
Using Watches
The Watches debug panel is a place where you can enter variable names and expressions that you want to watch during a debugging session.
To Watch a Variable
- Enter the variable to watch in one of the following ways:
- In the Steps panel of the Task Builder, right-click the Create variable step associated with the variable you want to watch and select Add to WatchList.
- In the Variables debug panel of the Task Builder, right-click the variable you want to watch and select Add to WatchList.
- In the Watches debug panel, type the name of the variable in the provided text box and click Watch.
To Watch an Expression
-
In the Watches debug panel, enter the expression to watch in one of the following ways:
- Type the expression into the text box. For example, to evaluate the length of an Automate variable named myName, enter Len(myName).
- Click , located to the right of the Watches text box. When the Expression Builder dialog box appears, use it to create an expression to watch. Click Insert when finished.
- Click Watch.The expression and its current value (if applicable) is added to the Watches debug panel.
To Modify a Watch
- In the Watches debug panel, right-click the desired watch and select Change.
- Enter the new variable or expression name for the watch, and then press Enter.
To Remove a Watch
- Select the watch to be removed, and then press the Delete key.
- Right-click on the desired watch, and then select Remove .
- To remove all watches, right-click on any watch and select Remove All.