promptgarten ๐ŸŒฑ
๐ŸŒ ES

Command reference ยท Claude Code

/debug

Enables debug logging for the current session and helps with troubleshooting via the session debug log.

[Skill] Debug logging is off by default (unless started with 'claude --debug'); running /debug mid-session captures logs only from that point on. Optionally, a problem description can be given to focus it.

โœ… WHEN TO USE IT?

Start capturing debug logs from now on for a reproducible problem

/debug MCP server keeps disconnecting โ€” right before triggering the problem again

Systematically enable logging before a hard-to-trace bug hunt

/debug to capture tool calls and errors in the session debug log

โ›” WHEN NOT TO?

The error already happened earlier

/debug only captures logs from the moment it's activated, earlier events are missing

Better: restart the session with 'claude --debug' to log from the very start

SOURCES