Debugging tools

Debug 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.
  • A header bar appears below the bot name on the Bot editor 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 header bar also displays a hierarchical stack list of bots. It displays the same list of bots as in the Call Stack. From this stack list of bots, you can navigate to a specific bot. For example, you can use this feature to navigate to a specific bot and check which line you stepped into to access the existing child bot. The header bar also displays the debug controls as in the Assistant. You can access them from the header bar or the Assistant. The header bar also displays a link to the current bot being debugged in case you navigated away from the current bot.
  • 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.
注:
  • 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

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.
注: 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. Once the action is enabled, you can step in.
注: There is no limit to the number of child bots that you can step in.
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 from where you stepped in.
注: 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 automations are called and to quickly navigate from one automation to the next. Call Stack lists the automations that are currently active, including both parent and child automations, with the line number and the folder they reside in. The automation 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.

The drop-down in the header bar shows the same list of bots as in 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 previous bot now becomes the current bot being debugged.

Depending on the bot that you have currently selected in the Call Stack, the Watched variables will show the variables for that specific bot that you can then select for watching.

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.
注: Enabling breakpoints in child bots 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.

注: 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.