---
schema_version: "1"
id: eed3d7f724cf016da6e2a59c7bfe23fd64a4aaa5352b033ae3bd6684d76ceae3
title: Test or Troubleshoot Flows with the Flow Builder Debugger
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_test_debug.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_test_debug.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 604fa15716cbb142104f01e02dc24e73e85943388576e67d8521d5ec23b57816
description: For flows that don't use Test Mode, use the Debug option to test or troubleshoot the flow. Review step-by-step details of how the flow runs and the path it takes.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Test or Troubleshoot Flows with the Flow Builder Debugger

For flows that don't use Test Mode, use the Debug option to test or troubleshoot the flow. Review step-by-step details of how the flow runs and the path it takes.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="vertical-align:top;" id="d313391e59">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d313391e59 ">To debug a flow in Flow Builder: </td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d313391e59 ">View All Data</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d313391e59 ">To open, edit, create, activate or
              deactivate a flow using all flow types, elements, and features available in Flow
              Builder, including Einstein and Agentforce for Flow:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d313391e59 ">Manage Flow</td>

          </tr>
        </tbody>
      </table>

![Warning](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_warning.png)

Warning If you debug a flow without selecting **Run flow in rollback mode**, the flow performs its actions, including any Data Manipulation Language (DML) operations and Apex code execution. Remember, closing or restarting a running flow doesn’t roll back its previously executed actions, callouts, and changes committed to the database.

Autolaunched and record-triggered flows use Test Mode instead of the Debug option. In test mode, you can save and reuse test scenarios. To edit the flow, switch to Build mode. See [Testing Your Flow in Test Mode (Beta)](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_mode.htm&release=264.0.0&type=5 "Use Test Mode to configure, save, and run test scenarios for autolaunched and record-triggered flows. To use automated testing in Test Mode, turn on Scenario Testing Automation and add assertions to evaluate expected results automatically.").

Watch this video to learn the advantages of the Flow Builder debug feature and get tips for using it effectively.

View this [video](https://play.vidyard.com/Gp5otjrQ2jrAqwssiaPqTp?) in a separate tab.

The Flow Builder debug option has some limitations. See [Flow Builder Debugger Considerations](https://help.salesforce.com/s/articleView?id=platform.flow_considerations_troubleshooting.htm&release=264.0.0&type=5 "Use these considerations when you debug a flow in Flow Builder.").

To use generative AI to diagnose errors and automatically apply fixes, see [Troubleshoot Flow Errors with Agentforce (Beta)](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_troubleshoot_flow_errors_with_agentforce.htm&release=264.0.0&type=5 "Use Agentforce to troubleshoot design-time issues in saved flows and run-time errors in active flows, eliminating the need for manual troubleshooting. The Flow Automation agent diagnoses issues, identifies root causes, and explains remediation steps all in natural language. In some situations, the Flow Automation agent can automatically fix the flow for you.").

1. Open an eligible flow in Flow Builder.
2. Click **Debug**.
3. Set the debug options and input variables.
    
    The debug options vary depending on the flow type.
    
    ![Debugging options and input variables](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/flow_debugger_options.png)
4. To debug the flow as another user, in Debug Options, select **Run flow as another user** and search for the user that you want to debug.
    
    This option requires that an admin first complete a one-time org setup. See [Turn On Debugging and Testing Flows as Another User](https://help.salesforce.com/s/articleView?id=platform.flow_test_debug_as_another_user.htm&release=264.0.0&type=5 "Turn on this org-wide setting once so that admins can debug or test flows as a specific user."). You can debug a flow as another user only in a sandbox environment.
5. Click **Run**.
    
    The debug details for the run appear in the debug panel. The debug run is organized into cards (1) that highlight key information about the run. To resize the debug panel, drag the edge of the panel to your desired width, or click ![Expand icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/arrow_left_60.png) and ![Shrink icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/arrow_right_60.png)(2). To search the debug run results, enter a search term in the search box (3). To copy the debug log to your clipboard, click ![Copy icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/copy_to_clipboard_60.png)(4).
    
    ![Debug Details panel.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/flow_debugger_details_panel.png)
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_note.png)
    
    Note From the Details tab in the debug panel, you can also click **Ask Agentforce (Beta)** to get an AI-generated root cause analysis and optionally apply an automatic fix. See [Troubleshoot Flow Errors with Agentforce (Beta)](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_troubleshoot_flow_errors_with_agentforce.htm&release=264.0.0&type=5 "Use Agentforce to troubleshoot design-time issues in saved flows and run-time errors in active flows, eliminating the need for manual troubleshooting. The Flow Automation agent diagnoses issues, identifies root causes, and explains remediation steps all in natural language. In some situations, the Flow Automation agent can automatically fix the flow for you.").
    
    ![The Ask Agentforce (Beta) button in the Debug Details window](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/automate_flow_test_ask_agentforce.png)
6. If you selected Debug wait element behavior when you set the debug options, select a **Wait Path**, and then click **Continue the Debug Run** for each Wait element in the flow.
    
    The debug details for the run appear in a panel on the right.
    
    ![Wait element debug configuration](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/flow_test_debug_wait_element.png)
7. (Optional) To restart the flow by using the same or different values for the input variables, click **Debug Again**.

#### See Also

- [Customize What Happens When a Flow Fails](https://help.salesforce.com/s/articleView?id=platform.flow_build_logic_fault.htm&release=264.0.0&type=5 "Learn how fault paths customize what happens when a flow fails. Choose how to notify admins, guide users, and take a follow-up action.")
- [Flow Builder Debugger Considerations](https://help.salesforce.com/s/articleView?id=platform.flow_considerations_troubleshooting.htm&release=264.0.0&type=5 "Use these considerations when you debug a flow in Flow Builder.")
- [Lightning Runtime vs. Classic Runtime for Flows](https://help.salesforce.com/s/articleView?id=platform.flow_distribute_runtime.htm&release=264.0.0&type=5 "Depending on how a flow is distributed, users see either the Classic runtime or Lightning runtime UI when they run the flow. Like its name suggests, Lightning runtime looks and feels like Lightning Experience.")
- [How Flows Run in Transactions](https://help.salesforce.com/s/articleView?id=platform.flow_concepts_transaction.htm&release=264.0.0&type=5 "Flows run within transactions that group operations as a single unit. When any operation fails, the entire transaction rolls back to maintain data integrity. This includes Apex triggers, escalation rules, and all flow interviews in the transaction.")
- [Testing Your Flow Before Activation](https://help.salesforce.com/s/articleView?id=platform.flow_concepts_testing.htm&release=264.0.0&type=5 "Test your flow before activation to catch errors, verify every path, and prevent data issues. Depending on the flow type, use Test Mode or the Flow Builder debugger to test different scenarios with sample data.")
- [_Trailhead_: Flow Troubleshooting](https://trailhead.salesforce.com/content/learn/modules/flow-troubleshooting)
- [Process Automation Settings](https://help.salesforce.com/s/articleView?id=platform.automation_about_settings.htm&release=264.0.0&type=5 "Salesforce provides various settings for platform automation to help customize and streamline business processes.")
- [Troubleshoot Flow Errors with Agentforce (Beta)](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_troubleshoot_flow_errors_with_agentforce.htm&release=264.0.0&type=5 "Use Agentforce to troubleshoot design-time issues in saved flows and run-time errors in active flows, eliminating the need for manual troubleshooting. The Flow Automation agent diagnoses issues, identifies root causes, and explains remediation steps all in natural language. In some situations, the Flow Automation agent can automatically fix the flow for you.")
- [Testing Your Flow in Test Mode (Beta)](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_mode.htm&release=264.0.0&type=5 "Use Test Mode to configure, save, and run test scenarios for autolaunched and record-triggered flows. To use automated testing in Test Mode, turn on Scenario Testing Automation and add assertions to evaluate expected results automatically.")