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 embedded expression. For example, to watch the length of an 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.
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 Watches debug panel, type the name of the variable in the provided entry 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 entry box. For example, to evaluate the length of an variable named myName, enter Len(myName).
OR
Click the Gear button to the right of the Watches entry box. Then use the Expression Builder to create an expression to watch. Click Insert when you are finished.
Click Watch to add to the watch list.
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 watch and select Change.
Type the new variable or expression for the watch and press Enter.
To remove a watch
Select the watch to be removed and press the Delete key, or select Remove from the right-click menu.
To remove all watches, select Remove All from the right-click menu.
NOTE: Using watches can affect runtime performance in the debugger on slower machines. If debugging speed becomes a factor, try removing watches that are no longer needed. This does not apply to runtime performance outside the debugger, as watches are ignored when the task is executed outside Task Builder. |