Skip to main content
New tool CRON Expression Builder — preview next run times before you schedule Apex. Open the builder →
A 3D magnifying glass examining a circuit board, representing Salesforce Flow debugging for developers.
Flow

Salesforce Flow Debugging: A Developer's Guide

Debugging Salesforce Flows is how you get automation you can rely on. This guide covers the techniques for finding and fixing problems inside Flow Builder.

Key takeaways Debug regularly. It is how you end up with Salesforce Flows that hold together. The Flow Builder Debug Panel gives you step-by-step execution detail. Learn to read element results, variable values, and condition outcomes. Customize the Debug Panel for API names and governor limit monitoring. Export the debug log for documentation or to hand to a colleague. Screen Flows debug by toggling between the Screen and Flow Canvas views.

Understanding Salesforce Flow debugging

Sooner or later a flow you built does something you did not expect. Debugging is how you get automation you can rely on, whether it's a simple email alert or a complex record-triggered flow. Salesforce has put real work into Flow Builder's debugging tools, and you can now see much more of what a flow does while it runs.

A complex flow with many elements, decision paths and variables has plenty of places to fail. The debugger shows the internal workings, so you can find where execution diverged from what you expected.

Using the Flow Builder Debug Panel

Once a flow is built, the Debug option in Flow Builder runs a simulation. The Debug Panel opens on the left of your screen, and the flow canvas stays visible on the right, so you can review and adjust an element's configuration without leaving the run.

Initial debug setup

The Debug Panel shows different options depending on the flow type. For record-triggered flows, you pick a specific record to start the debug run against. Other options include:

  • Committing changes to the database
  • Running the flow as another user
  • Setting input variables
  • Skipping start condition requirements

Clicking Run executes the flow based on your configurations. The flow canvas draws the execution path with a bold line, showing the decisions taken.

The Debug Panel then gives you:

  • Confirmation of whether start conditions were met.
  • Successfully executed elements.
  • Decision outcomes.
  • Variable values assigned during execution.

The panel lists all of this in the order it happened, so you can trace the flow's exact sequence of events. When the execution path goes somewhere unexpected, this is what tells you where.

Interpreting debug step details

Each execution step appears in a collapsible box. Expand one and you get:

  • Parenthetical values: a value in parentheses, such as Status__c (Approved), is the current value of that field. Useful for checking whether a condition was met.

  • Data element results: for elements like Get Records, Create Records, and Update Records, the debugger prints output that resembles a SOQL query, showing the operation it ran on the backend.

    SELECT Id, Name, Status__c FROM Account WHERE Id = '001xxxxxxxxxxxx'
    

    If you read SOQL this is instantly legible; if you don't, give yourself a moment to pick out the field names, operators, and values.

  • Update Records: for Update Records elements, the panel shows the final updated field values, a quick way to verify the change landed.

Customizing the Debug Panel

The Panel Preferences gear icon holds a couple of settings worth knowing:

  • Display API names: switch elements from labels to API names, which helps with custom elements.
  • Governor limit consumption: watch how much of your governor limits the flow consumes as it runs, so you spot a problem early.

The panel can be resized or expanded for better readability.

Accessing debug logs

You can export the debug results for documentation, for someone else to troubleshoot, or to read offline. The clipboard icon in the upper-right corner of the Debug Panel copies the complete text version of the debug log.

Debugging Screen Flows

Screen Flows debug inside Flow Builder too. The Debug Panel appears on the left, and the right side has two tabs: one for the user interface (Screen) and one for the flow canvas (Flow Canvas). That pairing lets you line up what the user does against the flow logic underneath, as it runs.

Originally reported by salesforceben.com

Newsletter

One email every Tuesday

New guides, tool updates, and the release-note changes that break things.

No spam. Unsubscribe in one click.

Comments

Loading comments...

Leave a Comment