# Debug

Detail for working on the code, dropped in production.

Pattern: `debug.*` (this page) · Written with: [`log()`](https://www.prongs.dev/docs/profiles/logs.md) · Intents: [1](#intents) · Levels: `debug`

## Intents

| Intent | Status | Use it for |
|---|---|---|
| [`debug.trace`](https://www.prongs.dev/docs/intents/debug/trace.md) | `debug` | Detail for working on the code |

## Recording one

Name what happened. The intent sets the level and whether it alerts.

```ts
// Detail for working on the code
log('debug.trace', 'Resolved page', { slug: 'about', tookMs: 12 });
```

Writes, in development only (debug.trace)

```ts
{
  "intent": "debug.trace",
  "level": "debug",
  "alert": false,
  "message": "Resolved page",
  "data": {
    "slug": "about",
    "tookMs": 12
  },
  "time": "2026-10-09T12:00:00.000Z"
}
```

## Is it a debug entry?

Find the row that describes your case, and use the domain on the right.

| If the problem is | Use |
|---|---|
| Who did what, kept as a record: things created, changed, deleted, and changes to access. | [`audit.*`](https://www.prongs.dev/docs/intents/audit.md) |
| Signals worth watching: failed sign-ins, bad tokens, rate limits, probing. | [`security.*`](https://www.prongs.dev/docs/intents/security.md) |
| Something broke or degraded, and someone should look. | [`incident.*`](https://www.prongs.dev/docs/intents/incident.md) |
| Background work: syncs, backups, migrations, scheduled runs. | [`job.*`](https://www.prongs.dev/docs/intents/job.md) |
| Detail for working on the code, dropped in production. | `debug.*` (this page) |

## For registry authors

**Starter intents.** These are the intents `prongs add logs` puts in your registry. Change levels through the [`level.*`](https://www.prongs.dev/docs/intents/logs.md#level) intents, and point [`log()`](https://www.prongs.dev/docs/profiles/logs.md) at your logger.
