> For the complete documentation index, see [llms.txt](https://docs.bugbug.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bugbug.io/debugging-tests/breakpoint-run-step-by-step.md).

# Breakpoint (run step-by-step)

How to pause a BugBug test in a chosen place and run it step by step: Run and pause here, breakpoints saved in the test, paused mode and Run next step and pause.

You can run a test until a certain point and then pause, so that you can investigate what you need using in-browser [Chrome debugging tools](https://docs.bugbug.io/debugging-tests/debug-in-chrome.md).

## Run step-by-step

BugBug supports step-by-step execution of the tests. To do this, click `Run and pause here` between steps. This will activate the **paused mode**. In this mode, you can run a test step-by-step and completely control an execution process.

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2FS3kJzqmnhiVm4qNcNxvs%2Fimage.png?alt=media&amp;token=b75f3e10-e12f-4eac-958f-7175fb7553e8" alt=""><figcaption><p>To enable step-by-step execution, click on the "Run and pause here" action.</p></figcaption></figure>

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2FgRMEhR3OE8GDyA7yPW99%2Fimage.png?alt=media&amp;token=8dc448ef-672b-46d4-8e5c-91a39477005b" alt=""><figcaption><p>Paused mode. To execute next step click on the "Run next step and pause" icon</p></figcaption></figure>

When a test is paused, a browser window with a test will display BugBug's overlay with options to control the execution process.

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2Fwvgnn4Ehlc3VbdPewBRD%2Fimage.png?alt=media&amp;token=46d07999-34bd-41bb-9552-5b9b8caf08e9" alt=""><figcaption><p>Paused mode in a window with a test. BugBug's overlay has options to control the execution process</p></figcaption></figure>

## Breakpoints

A breakpoint marks a place where the test pauses every time you run it locally. Click `Add breakpoint` between steps to set it, and `Remove breakpoint` to remove it.

* **A breakpoint stays in the test.** It's saved with the test until you remove it, unlike `Run and pause here`, which pauses only the run you start with it.
* **Cloud runs skip breakpoints.** A test with a breakpoint runs in the cloud to the end, without pausing.

## Options between steps

Hover between two steps and click `+` to see the options:

| Option                    | What it does                                                       |
| ------------------------- | ------------------------------------------------------------------ |
| **Run and pause here**    | Runs the test from the beginning and pauses in this place.         |
| **Add breakpoint**        | Sets a breakpoint: every local run pauses in this place.           |
| **Remove breakpoint**     | Removes the breakpoint from this place.                            |
| **Resume from here**      | In paused mode, continues the test from this place.                |
| **Resume and pause here** | In paused mode, continues the test and pauses again in this place. |

In paused mode you can also click **Run next step and pause** to run one step at a time, or **Resume** to continue to the end.

BugBug allows you also to rewind or fast-forward the execution process. You can read more about it here [Edit & Rewind](https://docs.bugbug.io/workflow-tips/edit-and-rewind.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bugbug.io/debugging-tests/breakpoint-run-step-by-step.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
