# Debugging a flow

Sometimes your flows won't work as expected, and you'll need to dig a bit deeper. Here are some ways to help debug your flows.

## Step Button

The Step button allows you to run a single command at a time:

![](/files/-Mfj9GjXvEz6ngQVq_MV)

You can use the Step button to check the result after each command and make sure that each step works as expected.

If you find that your flow works correctly when you step through the flow, but that it breaks when you run it normally, this might mean that there is a race condition. In other words, Browserflow may be performing actions before the website can properly handle it.

One way to work around this is to add `Wait` commands to make Browserflow wait after a command before proceeding. If you encounter this scenario, it may be indicative of an issue with Browserflow — [please report it as an issue](/support/getting-help.md).

## Disable Commands

If you want to test only a few steps of your flow, you can disable commands to skip them when your flow is run:

![](/files/-Mfj9dJFb_rQISuEU_QZ)

## Add Breakpoints

The `Wait` command can be used as a breakpoint by selecting "Wait until resumed" as the type. This command will pause the flow until it is resumed by clicking "Run" or "Step". It is useful for running the flow until a certain point.

{% hint style="danger" %}
The "Wait until resumed" type for the `Wait` command is a temporary solution for supporting breakpoints and will likely be removed at some point in favor of an improved solution.
{% endhint %}

## Console

The console provides information that's useful for debugging your flow.

### Logs

The logs tab shows a record of all commands that have been run and any errors:

![](/files/-MToEHhr0a8Un_a5YJeJ)

Clicking on a log message will highlight the command that was running at the time.

### Variables

The variables tab shows the current value of each variable:

![](/files/-MToEqyvLTcNSx0Dq11o)

Stepping through the flow and inspecting the variables is often helpful for identifying issues with a flow.

### Output


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.browserflow.app/guides/debugging-a-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
