Debugging your automations
- 版本:
- 已更新: 2023/09/12
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.
- 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.
- 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.
- 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 | -- | Use Start debugging to start the debugging process. | |
Step to next action | 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 | 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 | 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 |
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 |
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 |
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
- 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 ( ) icon next to Watched variables to add or remove variables manually.
Editing watched variables
- 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.
- Click the edit icon next to the variable name.
- Change the value of the variable and click Update.
- 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.
- 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.
- You can watch variable values only when you start the debugging process.
- You cannot debug child bots from their parent bot.