Debugging your automations

You can use the Debug tool in the Bot editor to debug your automations.

Using the Debug tool

From the Automation page, select and edit the bot that you want to debug. You can access the Debug tool from the Assistant utility or from the Bot editor.

Access the Debug tool

Open the Debugger tool

When you invoke the Debug tool from the Bot editor:
  • You can add, update, or delete actions and variables within a bot. You can continue to edit the bot as long as the debugging process has not yet started.
  • A header bar appears below the bot name that displays the name of the bot being debugged. The header bar displays Now debugging and the bot name afterward. For example: Now debugging: MSGBot5
  • The Actions panel on the left side of the Bot editor automatically collapses. This helps in providing more horizontal area to view the actions added in the Bot editor while debugging. Once the debugging stops, the Actions panel expands again.
Note:
  • Invoking a debugger does not start debugging.
  • Before you start debugging, ensure that you fix validation any errors in your bots.
  • You can debug the bot in Flow and List views. However, for better visibility of your actions, we recommend that you debug your bot in the List view.
When you open the Assistant utility from the Bot editor, API editor, or the Template editor, and move it to a specific position, the editor will retain the last position of the Assistant utility even after you exit the editor. The default position of the Assistant utility will correspond to the last position you moved it to, before exiting the editor:
  • even if a user session times out or if the browser is closed abruptly.
  • even if you open the editor from a different browser or log in to a different session using the same user credentials.

This improves the usability of the Assistant as you no longer have to move the Assistant to the right of the editor to view the Actions panel each time you open the bot within the editor.

Debug controls

Actions Icons Keyboard shortcuts Description
Start debugging Start button -- Use Start debugging to start the debugging process.
Step to next action Step over button F6 Use Step to next action to debug one action at a time. After you have debugged the current action, you can use Step to next action to move to the next action in the sequence.
Continue to next breakpoint Continue to next breakpoint button F5 Use Continue to next breakpoint to move to the next breakpoint directly. Continue to next breakpoint executes the current action and then moves to the next breakpoint and pauses.
Note: When debugging is in progress, the Start debugging icon changes to Continue to next breakpoint.
Stop Stop button F7 Use Stop to stop the debugging process.

Adding breakpoints

Breakpoints allow you to pause the debugging process during a bot run. To pause and troubleshoot a specific action, you can insert a breakpoint at that specific action. When you enable the breakpoint, the specific action that is being debugged is highlighted with a pause sign against it. After you add the breakpoint to pause the debug tool, you can Continue to next breakpoint, Step to next action, or Stop the debugging process.

Actions Icons and keyboard shortcuts Description
Enable breakpoint

Enable breakpoint button

F9

To insert a breakpoint, click the vertical ellipses on the specific code line and select Enable breakpoint.

Alternatively, you can also enable a breakpoint by clicking on the specific line number. This displays a breakpoint icon on top of the line number.

Note: When you enable a breakpoint for a specific line of code, the Debug tool highlights it and denotes it with a pause button at the right side of the code line.
Disable breakpoint

Disable breakpoint button

F9

To disable a breakpoint, click the vertical ellipses on the specific code line and select Disable breakpoint. The breakpoint becomes inactive. Additionally, you can also click the breakpoint icon on top of the specific line number to disable it.
Clear all breakpoints

Clear all breakpoints button

Shift + F9

To clear all breakpoints, click the Clear all breakpoints icon.

Watched variables

You can use Watched variables to watch the values of the specific variable during bot execution. By default, the Watched variables list is empty. With a single click, you can add used variables in a bot. These variables are displayed in a pop-up where you can select or deselect, one or more variables, from the list.

Adding watched variables

You can add variables used in a bot to the Watched variables list using either of these methods:
  • Select the Click here to add used variables link in the Assistant utility pane to add all of the used variables in a bot with one click.
  • Click the x ( Debug tool Manual add icon) icon next to Watched variables to add or remove variables manually.

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: If you rename a variable that is in the Watched variables list, then you must re-add it for it to display in the Watched Variables list.

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.
Note:
  • To edit the watched variables, ensure that you install Bot Agent version 21.250 (which was released with Automation 360 v.29) 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.
  • You cannot debug child bots from their parent bot.