Files
coder/docs/reference/agent-api/debug.md
T
Nick Vigilante f5909d2acb docs: reformat reference, start, and install docs to one sentence per line (#30696)
Reformats the remaining non-generated pages under `docs/reference`,
`docs/start`, `docs/get-started`, `docs/install`, and `docs/about` to
one sentence per line, as the [docs style
guide](https://github.com/coder/coder/blob/main/docs/.style/style-guide/formatting.md#one-sentence-per-line)
requires. Hard-wrapped paragraphs are unwrapped and lines holding
several sentences are split, so a later edit to one sentence shows up as
a one-line diff.

Only whitespace inside paragraphs and list items changes, and the
rendered pages are the same. Comparing every changed file against `main`
word for word, ignoring whitespace and blockquote `>` markers, finds no
differences. `git diff --word-diff` is easier to read than the line
diff.

Applied with an in-progress formatter, limited to pages listed in
`docs/manifest.json` and excluding generated reference docs. This is one
of a batch of PRs that split the docs by area (23 files changed, 286
insertions(+), 291 deletions(-)).

---
🤖 Built with AI assistance.
2026-10-16 17:58:14 -04:00

77 lines
2.2 KiB
Markdown

---
title: Debug
---
## Get debug logs
### Code samples
```sh
curl $CODER_AGENT_DEBUG_ADDRESS/debug/logs
```
`GET /debug/logs`
Get the first 10 MiB of data from `$CODER_AGENT_LOG_DIR/coder-agent.log`.
### Responses
| Status | Meaning | Description | Schema |
|--------|---------------------------------------------------------|-------------|--------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | |
## Get debug info for magicsock
### Code samples
```sh
curl $CODER_AGENT_DEBUG_ADDRESS/debug/magicsock
```
`GET /debug/magicsock`
See [Tailscale's documentation](https://pkg.go.dev/tailscale.com/wgengine/magicsock#Conn.ServeHTTPDebug).
## Toggle debug logging for magicsock
### Code samples
```sh
curl $CODER_AGENT_DEBUG_ADDRESS/debug/magicsock/debug-logging/true
```
`GET /debug/magicsock/debug-logging/{state}`
Set whether debug logging is enabled.
See [Tailscale's documentation](https://pkg.go.dev/tailscale.com/wgengine/magicsock#Conn.SetDebugLoggingEnabled) for more information.
### Parameters
| Name | In | Type | Required | Description |
|---------|------|---------|----------|---------------------|
| `state` | path | boolean | true | Debug logging state |
### Responses
| Status | Meaning | Description | Schema |
|--------|---------------------------------------------------------|-------------|--------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | |
## Get debug manifest
### Code samples
```sh
curl $CODER_AGENT_DEBUG_ADDRESS/debug/manifest
```
`GET /debug/manifest`
Get the manifest the agent fetched from `coderd` upon startup.
### Responses
| Status | Meaning | Description | Schema |
|--------|---------------------------------------------------------|-------------|----------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [agentsdk.Manifest](./schemas.md#agentsdkmanifest) |