Skip to content

Debug Flows

Debugging helps you detect and remove existing or potential errors. Flow debugging is available in Edit mode only. On activating your Flow in Debug mode, the users will still be able to interact with your Flow, though the Flow execution will be slower. The Flow will be automatically reactivated in production mode in 1 hour.

How to debug your Flow

Set necessary breakpoints to one or more Steps and activate the Flow in Debug mode to start.

Debug panel

Once you activate your Flow in Debug mode, the Debug panel will open. From there you can control the debugging process and navigate through your Flow - move to the next breakpoints or Steps, remove set breakpoints, open the Debugging tab, and reactivate your Flow to debug. The timer on the panel shows when the Flow will be automatically reactivated in production mode. The timer is reset each time you activate the Flow to debug.

Debug panel

Real-time logs

In Debug mode, logs of this.log functions will appear in real time when the Flow is running. To browse through the logs, click Open logs and then select Real-time from the Range dropdown.

Debug panel

Breakpoints

To toggle a breakpoint, right-click on a Step and click Add/Remove breakpoint in the context menu. You cannot set breakpoints to Gateway Steps. When the Flow is running and getting to a breakpoint Step, it will stop its execution until you click Next break or Next step in the Debug panel. You don't need to reactivate the Flow for the breakpoints to work.

Breakpoints support conditions. For example, you can stop an HTTP Flow when you are debugging query parameters. For setting this condition, add this.mergeFields[‘http’].get({‘path.queryParams.debug’}) === ‘true’. Now only requests with ?debug=true will be stopped.

Note

Switching to View mode won't reset the breakpoints, but will reset the Flow data and traffic. In this case, the data will be displayed starting from the current Step you are in.

Merge field data

The Variables section displays all Merge field data when the Flow is running. Merge field information will be grouped by type: Session, Global, and Shared. The groups Global and Shared display all Merge field data of the related type from all Flows within the Bot, regardless if they are used in the current Flow or not. Up until the first breakpoint the Variables section will display values of all Merge fields of all Steps the Flow is passing through. Starting from the second breakpoint, only those Merge fields will be displayed that are defined by Steps that have breakpoints.

Debugging tab

The tab informs you of the following in Debug mode:

  • Event: displays the information about the service the Flow is subscribed to.
  • Merge Field Data: shows the Merge field data once the Flow has passed a Step. Merge field information is grouped by type: Session, Global, Shared.
  • Session: displays the information about the current session.
  • Breakpoints: lists set breakpoints. You can set conditions for each breakpoint execution.
  • Reporting Events: shows data on all events a Step reports.
  • Error: informs if an error happened during the Step execution. The Step that contains the error will be marked in red.

General tips on troubleshooting your Flow

  • Look for Steps, marked in red, on the Canvas. The red color is an indicator that a Step has an incorrect configuration.
  • View Flow traffic. The traffic displays which paths users have taken.
  • View logs. Steps containing an error are marked in either yellow or red.
  • Cut the Step you have issues with off the tree and reattach it, or delete it and replace it entirely.
  • Try saving the Flow and refreshing the page.
  • Use the latest versions of Step templates and update older versions once an update is available.
  • Make sure you use the same major Step versions within the kit, as different versions are incompatible.

Why Steps can be marked red on the Canvas

  • The Step has no name, so it's impossible to generate/validate the Merge filed name.
  • Two or more Steps have the same name, and so do their Merge fields.
  • Other Step components have incorrect configuration (click a red Step to see if any of its fields in the Details tab are also marked red).
  • The name of either a Trigger Step or its respective Subflow has changed, and the Trigger Step has lost its connection to the other Step/Flow.

Note

The best practice is to save your Flow often to save the progress made.