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, andUpdate 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 Recordselements, 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.
Leave a Comment