> For the complete documentation index, see [llms.txt](https://docs.appetize.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appetize.io/features/debug-logs.md).

# Debug Logs

With Appetize, you can capture, inspect and troubleshoot all debug log events that occurred during your app session for real-time or later analysis.

{% hint style="warning" %}
Note by default, a user needs to be authenticated to view debug logs for their app. See [App Permissions](/platform/app-management/app-permissions.md) for more information.
{% endhint %}

## Capture Debug Logs

{% hint style="info" %}
Debug logs are generated by your app using [`NSLog`](https://developer.apple.com/documentation/foundation/1395275-nslog) or [`Logger`](https://developer.apple.com/documentation/os/logger) for iOS and [`Log`](https://developer.android.com/reference/android/util/Log) for Android
{% endhint %}

To enable Appetize to capture all debug log events, you can choose to enable it through a query parameter or with the help of the JavaScript SDK.

### With Query Parameter

Add the `debug=true` query parameter to your app or embed URL

```uri
&debug=true
```

See [Query Params Reference](/platform/query-params-reference.md#debug) for more information.

### With JavaScript SDK

Set `debug: true` in the configuration e.g.

```typescript
await client.setConfig({
    debug: true,
    ...
})
```

See [Configuration](/javascript-sdk/configuration.md#debug) for more information.

## Inspecting Debug Logs

### With App Page

The app page provides a simple debug log of all the events that took place. You can access this via your app's app link

{% code overflow="wrap" %}

```url
https://appetize.io/app/{appId|buildId|publicKey}?&debug=true
```

{% endcode %}

or by going to your [Apps](https://appetize.io/apps) page, selecting the app you want to inspect, and then clicking `debug` on the latest build or choosing a specific build you would like to debug.

<figure><img src="https://2147444700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJUveBCJfn0GR8-hlqi%2Fuploads%2Fro8Wl5iKd0sBn88Dsnam%2FScreenshot%202025-03-21%20113309.png?alt=media&amp;token=baf5e694-9eeb-4cd5-85e1-2561b33a03d6" alt=""><figcaption><p>Select <code>Debug</code> for the app or a specific build</p></figcaption></figure>

{% hint style="info" %}
Debug logs can also be downloaded via the `Download Logs` action at the top right of the log viewer. This is helpful when sharing logs with developers for troubleshooting purposes.
{% endhint %}

<figure><img src="https://2147444700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJUveBCJfn0GR8-hlqi%2Fuploads%2Ff23pGGmN93f5vuaQWOKV%2FScreenshot%202025-03-21%20113852.png?alt=media&amp;token=ba150629-4cde-44a5-93b9-062d92e59a65" alt="Example Debug logs from App Page"><figcaption></figcaption></figure>

### With JavaScript SDK

You can listen for all debug log events via our JavaScript SDK. To easily view them in the browser you can print them to the console or you can store it to file for later analysis

```typescript
// check debug logs
session.on('log', (data) => {
    console.log(data.message)
})
```

See our JavaScript [API Reference](/javascript-sdk/api-reference.md#on-1) for more information.


---

# 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.appetize.io/features/debug-logs.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.
