How do I test and debug a flow?

Testing and debugging are the most critical steps in Flow development. Salesforce provides a built-in Debug tool that allows you to simulate how your Flow will run without actually changing data (using “Rollback”) or by seeing exactly where a path fails.

Step 1: The Debug Tool

How do I test and debug a flow? | Salesforce | Step 1
  • Open your Flow in the Flow Builder.
  • Click the Debug button in the top-right corner.
  • Configure Debug Options:
    • Run flow in rollback mode: Keep this checked to ensure that any record changes made during the test are reversed when the debug finishes.
    • Run as another user: (Optional) Useful for testing if permissions or sharing rules affect the Flow.
  • Input Variables: If your Flow is “Record-Triggered,” you must select a specific record to test against.
How do I test and debug a flow? | Salesforce | Step 2
  • Click Run.

Step 2: Reading the Debug Details

Once the Flow runs, a side panel appears on the right labeled Debug Details. This is your map to what happened.

  • Blue Path: Look at the canvas; a blue line shows the exact path the Flow took.
  • Step-by-Step Breakdown: In the side panel, click into each element to see:
    • Inputs: What data entered the element.
    • Result: Whether it passed or failed.
    • Outputs: What data the element produced (e.g., “Successfully updated 1 record”).

Step 3: Common Error Types

When a Flow fails, the debug log will show a red error message. Here is how to interpret them:

Step 4: Using "Pause" and "Fault Paths"

For complex Flows, you can build safety nets directly into the design.

  • Fault Paths: If a “Create” or “Update” element might fail, you can click the element and select Add Fault Path. This allows the Flow to fail gracefully (e.g., by sending an email to the Admin) instead of showing the user a generic “Unhandled Exception” error.

Step 5: Best Practices for Instructional Designers

  • Always Debug First: Never activate a Flow without running it through the Debugger at least twice once for a “Success” scenario and once for a “Failure” scenario.
  • Check the Email: If a Flow fails in the “Live” environment, Salesforce automatically sends a Flow Error Email to the administrator. This email contains the full debug log, which is invaluable for fixing bugs reported by users.
Last Updated 2nd February 2026.

Was this article helpful?

We publish our Knowledge Base to help individuals and businesses resolve common issues across websites, advertising platforms, Salesforce and other digital systems.

We regularly review and update our guides, but the platforms, software and services covered can change without notice. As a result, screenshots, settings, features or recommended processes may differ from those available when an article was last reviewed.

The information provided is general guidance and should not be treated as advice specific to your systems or circumstances. UTDS Optimal Choice cannot accept responsibility for errors, data loss, service disruption or other issues resulting from changes made by following these guides.

If you are unsure about any of the steps, particularly where a change could affect live systems, data, tracking or business processes, we recommend speaking to us before making the change. Our team can review your specific setup and provide advice based on the current platform and configuration.

Time for some professional support?

Our team area ready to help. As one of the few digital agencies that is a registered Salesforce Consulting Partner and Google Partner Agency, UTDS Optimal Choice is expertly positioned to support you across your entire digital landscape.