Watched variables
- Updated: 2024/10/24
Watched variables
You can use Watched variables to watch the values of the specific variable when executing your parent or child bots. With a single click, you can add used variables in your automation. These variables are displayed in a pop-up where you can select or deselect, one or more variables, from the list.
Watched variables are essential in debugging because they allow you to monitor the values of specific variables throughout debugging process. They also enable you to understand the current state of variables. By watching variables, you can see how their values change as the automation executes, helping you pinpoint where and why unexpected behaviors occur.
Adding watched variables
- Select the Add all used variables link in the Assistant utility pane to add all of the used variables in an automation with one click.
- Click the x ( ) icon next to Watched variables to add or remove variables manually.
- Watched variables added to a specific bot while debugging are automatically saved ensuring all watched variables are retained even if you close and reopen your automation or switch between different debugging sessions.
- If you rename a variable that is in the Watched variables list, then you must delete the old variable add the variable with the new name for it to display in the Watched Variables list.
View watched variables
Select the specific watched variable to view its current value.
Editing watched variables
- In the Watched variables list, click the variable
that you want to edit.
A view with the specific variable details opens in the same tab.
- Click the edit icon next to the variable name.
- Change the value of the variable and click Update.
- To remove a variable, click the ellipsis next to the edit icon.
- To edit the watched variables, ensure that you install Bot Agent version 21.250 and later on your system.
- You cannot edit the values of the constant variables.
- You can edit a variable value only when paused at a breakpoint in debug mode.
- The variable value that you update in debug mode is effective only during the debug session. It does not change the original variable value. Once the variable value is updated, the next set of actions that refers to the variable will use the new value.
Instead of navigating to the Variable panel, the Watched variables detailed view provides a quick reference of the variable properties such as type, input, output, and constant.
- Number
- String
- Boolean
- Datetime
You can navigate to the next and the previous variables from the edit window by clicking the next and previous arrows, respectively.