> ## 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.

# Crash Dumps

> Detect and upload game crash dumps to help diagnose issues

When a monitored game closes, Overlayed automatically scans for new crash dump files. If a new dump is found, a `new`
event is emitted so you can prompt the user to submit it.

Crash dumps are uploaded to the [Overlayed Dashboard](https://overlay.dev) and associated with your application.

## Listening for crash dumps

```typescript theme={null}
overlay.crashDumps.on("new", async ({ id, game }) => {
	// Prompt the user — e.g. show a dialog asking if they want to submit
	const confirmed = await askUser("A crash was detected. Send report?");

	if (confirmed) {
		await overlay.crashDumps.submit(id);
	}
});
```

## Submitting a crash dump

Call `submit` with the `id` from the `new` event. This uploads the dump file to the Overlayed backend and removes the
local file on success.

```typescript theme={null}
await overlay.crashDumps.submit(id);
```

## Event data

```typescript theme={null}
type CrashDumpEvent = {
	/** Opaque identifier used to submit the dump. */
	id: CrashDumpId;
	/** Identifier of the game that crashed. */
	game: GameIdentifier;
};
```
