Search the documentation
33 pages for --debug.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
errors
Claude Developer Platform · in the page
api/errors
…`` ```bash CLI # The request-id header is printed to stderr with --debug: ant --debug messages create \ --model claude-sonnet-5 \ --max-tokens 1024 \ --message '{role: user, content…
using
Claude Developer Platform · in the page
cli-sdks-libraries/cli/using
…`--workspace-id`, which names the workspace they manage instead. | | `--debug` | Print full HTTP request and response to stderr…
workspaces
Claude Developer Platform · in the page
manage-claude/workspaces
…] }' | grep -i '^anthropic-workspace-id' ``` ```bash CLI # --debug prints the HTTP response, including the Anthropic-Workspace-Id # header, to stderr; > /dev/null hides the JSON body on s…
Authentication
Claude Code CLI · in the page
authentication
…ce in place of the `Login method` row. If you start Claude Code with `--debug`, it also writes a `Using Anthropic profile auth` line with the source name to the debug log at `~/.claude/debug/<session-…
Claude Code changelog
Claude Code CLI · in the page
changelog
…so the default binding keeps working, and a warning is logged under `--debug` * Fixed `/stats` activity heatmap showing each day's activity one cell off (Sunday's count under Monday) in timezones e…
Claude apps gateway deployment and operations
Claude Code CLI · in the page
claude-apps-gateway-deploy
…d what changed recently * **Login issue**: the developer runs `claude --debug-file ./claude-debug.txt`, reproduces, and sends that file plus the gateway's audit log for the same window * **Inference i…
Explore the .claude directory
Claude Code CLI · in the page
claude-directory
…| Per-session debug logs, written only when you start with `--debug` or run `/debug`…
CLI reference
Claude Code CLI · in the page
cli-reference
…ons` | | `--debug` | Enable debug mode with optional category filtering, such as `--debug='mcp,startup…
Commands
Claude Code CLI · in the page
commands
…log. Debug logging is off by default unless you started with `claude --debug`, so running `/debug` mid-session starts capturing logs from that point forward. Optionally describe the issue to focus th…
Manage costs effectively
Claude Code CLI · in the page
costs
…appears under PreToolUse. You can also start Claude Code with `claude --debug` and run a test command such as `npm test`. The debug log shows `modified tool input keys: [command]` when the hook rewrit…
Message your other Claude Code sessions
Claude Code CLI · in the page
cross-session-messaging
…at other sessions may still show the old name. Run the session with [`--debug`](/docs/en/cli-reference#cli-flags), and Claude Code logs the cause of the failed update. When you rename a session, or s…
Debug your configuration
Claude Code CLI · in the page
debug-your-config
…ct **Reconnect** from `/mcp`. If the count stays at zero, run `claude --debug=mcp` and read the server's stderr in the debug log at `~/.claude/debug/<session-id>.txt`. For configuration locations and…
Environment variables
Claude Code CLI · in the page
env-vars
…h, not a directory. Requires debug mode to be enabled separately via `--debug`, `/debug`, or the `DEBUG` environment variable: setting this variable alone does not enable logging. The [`--debug-file`]…
Error reference
Claude Code CLI · in the page
errors
…uld not evaluate this action and is blocking it for safety — run with --debug for details ``` **What to do:** * Retry the action; this usually succeeds on the next attempt * Run `claude --debug` and…
Claude Code GitHub Actions
Claude Code CLI · in the page
github-actions
…ated list of allowed tools. The `--allowed-tools` alias also works * `--debug`: enable debug output ## Upgrade from beta If your workflows still reference `anthropics/claude-code-action@beta`, updat…
Claude Code GitLab CI/CD
Claude Code CLI · in the page
gitlab-ci-cd
…ptEdits --allowedTools "Bash Read Edit Write mcp__gitlab" --debug ``` After adding the job and your `ANTHROPIC_API_KEY` variable, test by running the job manually from **CI/CD** → **Pipel…
Hooks reference
Claude Code CLI · in the page
hooks
…nothing to the terminal. To confirm the hooks ran, start with `claude --debug-file <path> --init-only`, replacing `<path>` with a log file location, and check the log for the Setup and SessionStart ho…
Automate actions with hooks
Claude Code CLI · in the page
hooks-guide
…derr, enable [debug logging](/docs/en/hooks#debug-hooks) with `claude --debug` or by running `/debug` mid-session. #### Structured JSON output Exit codes only let you block or stay silent. For more…
Interactive mode
Claude Code CLI · in the page
interactive-mode
…start Claude Code To find out which of these happened, start `claude --debug` with spell checking on and type a word. Then look for the `[spellcheck]` lines in the debug log at `~/.claude/debug/<sess…
Customize keyboard shortcuts
Claude Code CLI · in the page
keybindings
…loads and writes each one to the debug log. Start Claude Code with [`--debug`](/docs/en/cli-reference#cli-flags) to see the details.
Connect Claude Code to an LLM gateway
Claude Code CLI · in the page
llm-gateway-connect
…tries labeled `From gateway`. To confirm discovery ran, start `claude --debug` and look for the `[gatewayDiscovery]` lines in the debug log at `~/.claude/debug/<session-id>.txt`: a success logs how ma…
Model configuration
Claude Code CLI · in the page
model-config
…olves to the account-type default, with a warning visible only under `--debug`. Keep at least one guaranteed-available entry in the list to avoid this. Deploy both keys together in the highest-ranked…
Monitoring
Claude Code CLI · in the page
monitoring-usage
…the `claude_code.user_prompt` event. If nothing arrives, run `claude --debug` and check the debug log for OTel export errors. For full configuration options, see the [OpenTelemetry specification](ht…
Enterprise network configuration
Claude Code CLI · in the page
network-config
…t, start Claude Code with debug logging: ```bash theme={null} claude --debug ``` Debug output goes to `~/.claude/debug/<session-id>.txt` rather than the terminal, or to a path you set with `--debug-…
Create plugins
Claude Code CLI · in the page
plugins
…n entry with an invalid configuration is skipped instead; run `claude --debug` to see why. For complete LSP configuration options, see [LSP servers](/docs/en/plugins-reference#lsp-servers). ### Add…
Plugins reference
Claude Code CLI · in the page
plugins-reference
…P server entirely at startup, with the reason visible only in `claude --debug` output. **Multiple servers for the same extension**: when more than one enabled LSP server declares the same file extens…
Self-hosted environments reference
Claude Code CLI · in the page
self-hosted-environments-reference
…| | `--debug-token-dir <path>` | `SELF_HOSTED_RUNNER_DEBUG_TOKEN_DIR` | unset | Wri…
Configure server-managed settings
Claude Code CLI · in the page
server-managed-settings
…r approval and never executes. To debug delivery issues, run `claude --debug-file <path>` and search the log for `Remote settings`. Validate a payload change with `claude doctor` on a test machine be…
Extend Claude with skills
Claude Code CLI · in the page
skills
…ill works but Claude has no `description` to match against. Run with `--debug` to see the parse error. To find `SKILL.md` files whose frontmatter doesn't parse, run [`claude plugin validate`](/docs/e…
Customize your status line
Claude Code CLI · in the page
statusline
…your administrator whether this setting applies to you. * Run `claude --debug` to log the exit code and stderr from the first status line invocation in a session * Ask Claude to read your settings fil…
Create custom subagents
Claude Code CLI · in the page
sub-agents
…error to the debug log. To see the debug log, run Claude Code with `--debug`. A [plugin subagent](/docs/en/plugins-reference#agents) whose frontmatter has no `name` or doesn't parse still loads, un…
Tools reference
Claude Code CLI · in the page
tools-reference
…cgroup up, commands run without a cap, and the debug log from `claude --debug` says why. * After the first process Claude Code starts has turned the cap on, or has turned it off because of an off valu…
Troubleshoot installation and login
Claude Code CLI · in the page
troubleshoot-install
…detects Git Bash as if it were unset, logging a warning visible with `--debug`. A path that doesn't exist gets the same fallback and warning. Before v2.1.219, Claude Code used any existing file as the…