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

# Debug Events

## Introduction

Debug events are essential for identifying and resolving issues that may arise after your game has been released. These events help notify your team when exceptions occur and track arbitrary data points to ensure the game functions as expected. Debug events can be particularly useful during development and for tracking issues that are not consistently reproducible in testing.

## Events

#### [**`DebugEvent`**](/readme/analytics/api/events/debugevent.md)

Use this event to capture debug messages. These can be exception messages or any arbitrary strings that help in tracking the behavior of your game.

* You can use a [**`DebugEvent`**](/readme/analytics/api/events/debugevent.md) to track possible cheaters in your game. If there is a certain area in your game you know the user shouldn’t be able to access yet, or if you have other conditions that you know a player shouldn’t be able to meet, you can use a [**`DebugEvent`**](/readme/analytics/api/events/debugevent.md) to track that information.

#### [**`ErrorEvent`**](/readme/analytics/api/events/errorevent.md)

Use this event to capture error messages, categorized by their severity. This helps in identifying and prioritizing issues based on their impact on the game.

* You can use [**`ErrorEvent`**](/readme/analytics/api/events/errorevent.md) as part of a global exception-handling framework in your game. Rather than writing try/catch blocks throughout your code to catch unhandled exceptions, Unity supports a global exception handler, which is a single function that can be called *any* time an exception is thrown in your game and isn’t handled. You can then track these exceptions in one place and fire an [**`ErrorEvent`**](/readme/analytics/api/events/errorevent.md) whenever they occur, giving you insight into overall health and performance of your game.


---

# 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, and the optional `goal` query parameter:

```
GET https://lionstudios.gitbook.io/readme/analytics/debug-events.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
