⌨️/debug Command
Also known as /debug, claude --debug, Debug log, --debug-file
It turns on the debug log and reads it to find a problem.
Think of it like
It is like a camera you turn on. Then you watch the tape to see what broke.
Example
Jack's hook works in one project but not another. He runs /debug with that note, repeats the step, and Claude finds in the log that the hook's matcher never matched.
Why it matters
Some problems only show while a session runs. The log is where they leave a trace.
Definition
Example code
console
/debug my PreToolUse hook never runsCommon mistake
Key takeaways
- 1Turns on the log. From now on.
- 2Reads it for you. Finds the cause.
- 3Say what is wrong. To focus it.