> ## Documentation Index
> Fetch the complete documentation index at: https://docs.overlayed.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Debug Mode

> Enable debug mode for detailed logging and troubleshooting

Debug mode provides enhanced logging capabilities for development and troubleshooting purposes.

## Enabling Debug Mode

Debug mode can be enabled in your `OverlayedOptions` configuration:

```typescript theme={null}
import { overlayed } from "@overlayed/app";

const overlay = overlayed({
	debug: process.env.NODE_ENV === "development",
});
```

## Features

When debug mode is enabled, the following additional features are available:

* **`logger.debug()` logs** will be printed to the console and saved to the log file
* **Overlayed's internal logs** will be logged to the console

## When to Use Debug Mode

Debug mode is useful for:

* Development environments
* Troubleshooting issues
* Understanding application flow
* Inspecting internal Overlayed behavior

<Warning>
  Debug mode should be disabled in production environments as it can impact performance and generate large log files.
</Warning>

## Example Usage

```typescript theme={null}
import { overlayed } from "@overlayed/app";

const overlay = overlayed({
	debug: true, // Enable debug mode
});

// These debug logs will now be visible
overlay.logger.debug("Application initialized");
overlay.logger.debug("Game module loaded", { module: "siege" });
```
