> 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/console-logs.md).

# Console logs

BugBug can capture browser console logs during test execution, both in local and cloud runs. This helps you diagnose JavaScript errors, warnings, and custom log messages without leaving the test results view.

***

#### Enabling console logs

Console logs are **disabled by default**. To turn them on, go to **Project Settings** and find the **Console logs** section.

<figure><img src="/files/MtfStFNMxogXfPWBOvxN" alt=""><figcaption></figcaption></figure>

Three modes are available:

* **Disabled** - No logs are collected. This is the default setting.
* **Console logs** - Collects browser console logs for each test run. Logs are then available in Runs history.
* **Full BugBug debugging -** Collects extended internal BugBug logs. Use this only if you encountered a BugBug problem and want to help the support team debug it — not intended for everyday use.

{% hint style="warning" %}
Enabling console logs can slow down (or even break) your tests if your application generates a large volume of logs.
{% endhint %}

***

#### How to access console logs

Console logs are available for any completed test run (local or cloud) when collection is enabled.

**Option 1 — from the test run view**

1. Go to the **Runs history**
2. Click on the test run to open its details
3. Click the **Logs** button at the top of the page (next to "Go to test")

<figure><img src="/files/zCjfREovl1QGG4M0mlM4" alt=""><figcaption></figcaption></figure>

**Option 2 — from Artifacts**

1. Go to the **Runs history**
2. Click on the test run to open its details
3. Click **Details** on the test run
4. In the **Artifacts** section, click **Download test run logs**

<figure><img src="/files/9N6LgaRNDp3d5dqFUi9n" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Sometimes you have to wait a few seconds after test execution to catch and present logs in the UI
{% endhint %}


---

# 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 dynamically by asking a question.

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

```
GET https://docs.bugbug.io/debugging-tests/console-logs.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.
