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.

Note: By default, the Watched variables list is empty.

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

You can add variables used in an automation to the Watched variables list using either of these methods:
  • 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 ( Debug tool Manual add icon) icon next to Watched variables to add or remove variables manually.
Note: The pop-up will show all the variables and unused ones will be disabled. Watched variables added to a specific bot will be automatically saved, eliminating the need for manual saving.

Add watched variables

When a bot updates the variables, the values of those variables are updated dynamically in the Watched variables list. This provides a current status of a bot run at each action, and helps fix any bot-related errors early on from the Debug tool.
Note:
  • 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.

List of watched variables

You can view all details of the variable and check the variable properties without navigating to the variable manager.
Note: Watched variable values are only visible for bots that are stepped into and executed. If you do not explicitly step into a specific bot, the watched variable values for that specific bot will not be visible.

Read-only view of a selected watched variable

Editing watched variables

To edit the variables added to the Watched variables list:
  1. 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.

  2. Click the edit icon next to the variable name.
  3. Change the value of the variable and click Update.
  4. To remove a variable, click the ellipsis next to the edit icon.

    Edit and delete a watched variable

Note:
  • 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.

Currently, you can edit the values of the following variable types:
  • 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.

Move to the next variable using the back and front arrows

Note: You can watch variable values only when you start the debugging process.