Debugging tools enable you to troubleshoot complex automations with nested tasks. Debug parent and individual child bots within the parent to quickly identify and resolve issues in detail. You can examine each child automation individually, ensuring every part of your automation is functioning correctly, leading to more efficient and reliable automation processes.

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

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.
  • When you start debugging, a purple header bar appears below the bot name in the Bot editor which shows Now debugging followed by the current bot name which is being debugged.
  • The header bar also displays a hierarchical stack list of bots same as displayed in the Call Stack. From this stack list of bots, you can navigate to a specific bot and check which line you stepped in to access the current child bot. The header bar also displays a link which you can click to navigate to the current bot to continue debugging, in case you navigated away from the current bot.
  • Below the header bar, the debug controls same as shown in the Assistant are displayed for quick access to control the debugging.
  • 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 any validation 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

Note:
  • There is no limit to the number of child bots that you can step in.
  • Child bot debugging capability is supported with Bot Agent (version 22.60.23 and later) and Task Bot package (version 2.8.0-20230530-152744 and later).

Call stack

Call stack helps you to easily determine the order in which bots are called and to quickly navigate from one bot to the other. Call Stack lists the automations that are currently active, including both parent and child bots, with the line number and the folder they reside in. The bot that is currently active is highlighted and shown at the top of the list.

The Call Stack enables you to trace the error’s path from its origin to understand how it occurred. This helps in identifying the source of problems, especially in complex automation with multi-level nesting.

When you step in, the child bot is added to the Call Stack. When you step out of the child bot or complete debugging the child bot, the bot is removed from the Call Stack. The parent bot now becomes the current bot being debugged.

Depending on the bot that you have selected in the Call Stack, the Watched variables will show the variables for that selected bot. You can then select the variable to watch its current value from the Watched variables list.

Callstack view

Breakpoints

Breakpoints in debugging are tools that allow you to pause the execution of a program or automation at a specific point. This allows you inspect the current state of the application, including watched variables and the execution flow ensuring that your automation behaves as expected.

Breakpoint controls

Enabling breakpoints in parent and child bots allow you to pause the debugging process during a bot run to inspect the values of watched variables and the current state of automation. To pause and troubleshoot a specific action, you can insert a breakpoint at that specific action. This is useful for complex and long-running processes that span multiple tasks or child automations.

Review the following table to learn how to enable and disable breakpoints.
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.

How to use breakpoints for debugging

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 over to next action, Step into current action, or Stop the debugging process.

Breakpoints added to a specific bot while debugging are automatically saved ensuring all breakpoints are retained even if you close and reopen your automation or switch between different debugging sessions.
Note:
  • Checking in a specific bot will not create a new version of the bot since it is no longer modified.
  • Copying a bot does not copy breakpoints.

Breakpoint added to Line 2

You can set up breakpoints on the fly while debugging. For example, if you want to check the status of a parent bot of an existing child bot, you can navigate to that bot via the Call stack and add breakpoints within the parent bot as needed. After enabling the breakpoint, when you click the Continue to next breakpoint option, the bot will pause at the next breakpoint, which is the one you just added.

Let's explore a scenario where you enable breakpoints in specific bots while debugging an automation and observe how it behaves.
  1. Consider you are automating the process of client onboarding and have created three bots for this process namely Client Data Collector bot containing a Verification Process bot which in turn contains a Welcome Communicator bot
  2. Enable a breakpoint within the Welcome Communicator bot where you want the debugging to pause.
  3. Click the Start debugging icon.

    The bot will automatically step into the Welcome Communicator bot and pause at the set breakpoint.

  4. Step out of the Welcome Communicator bot.

    You will notice that the automation will pause directly at the Client Data Collector bot.

    Note: When stepping out of any specific bot, the bot should ideally pause at the line immediately following the one where you stepped in from its parent bot. However, in this scenario, you did not explicitly step into the Welcome Communicator bot; it was entered automatically due to the breakpoint.
  5. Similarly, when you perform a Step over from the last line of the Welcome Communicator bot, the bot will pause directly at the Client Data Collector bot.

For more information on debugging tools, see Leveraging code analysis and debug tool to improve and optimize your automation development.