Debugging tools

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).
Actions Icons Keyboard shortcuts Description
Start debugging Start button F6 Use Start debugging to start the debugging process.
Step over to next action Step over button F7 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 F6 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.
Step into current action Step-in button F8 Use Step into current action to step into the child bot for debugging. Step into current action is enabled only when you are calling a child bot using Taskbot > Run action.
Step out from current bot Step-out button Shift + F8 Use Step out from current bot to step out of the child bot after debugging and pause at the next line of the bot from where you stepped in.
Note: Step out from current bot is enabled only after you step into the child bot.
Stop debugging Stop button Shift + F6 Use Stop debugging to stop the debugging process.

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

Enabling breakpoints

Breakpoints 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. 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.
Note: Enabling breakpoints in child bots while debugging is currently not supported.
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.

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