> 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/debug-in-chrome.md).

# Debug in Chrome

After a failed local run, the BugBug test window stays open, so you can debug the page with Chrome DevTools. For cloud runs, use screenshots, the DOM snapshot and logs.

When your test fails in a [local run](https://docs.bugbug.io/running-tests/test-in-your-browser.md), the browser window will not close automatically. You can debug the test using all the native Chrome features, DOM navigator, network tab, etc. This is very useful when you need to [fix selectors because an "element was not found"](https://docs.bugbug.io/preventing-failed-tests/selectors.md#tips-on-fixing-selectors).

To open Chrome Dev tools **just right click on your page and click "Inspect".**

![](https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2F1DCMhBIrCVN6np1RdNUk%2FScreenshot%202022-04-12%20at%2010.14.50.png?alt=media\&token=92827621-1b6c-4389-956d-7a3887104472)

To stop a test in a chosen place and look at the page there, use a [breakpoint or Run and pause here](https://docs.bugbug.io/debugging-tests/breakpoint-run-step-by-step.md).

## Cloud runs

A cloud run has no window you can open. To debug it, use what BugBug saved for the run: [screenshots](https://docs.bugbug.io/debugging-tests/screenshots.md), the [DOM snapshot](https://docs.bugbug.io/debugging-tests/dom-snapshot.md), [console logs](https://docs.bugbug.io/debugging-tests/console-logs.md) and [network logs](https://docs.bugbug.io/debugging-tests/network-logs.md). Or run the same test locally.


---

# 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/debug-in-chrome.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.
