Skip to content
BENIBIX Learn

/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

/debug is a bundled skill that turns on debug logging for the session and then reads that log to find a problem. Logging is off unless you started with claude --debug, so /debug records from the moment you run it. Add a few words about the problem to point Claude at it.

Example code

console
/debug my PreToolUse hook never runs
Log this session and look into the hook.

Common mistake

Running /debug after the problem and looking for it in the log. It only writes down what comes next, so make the problem happen again.

Key takeaways

  1. 1
    Turns on the log. From now on.
  2. 2
    Reads it for you. Finds the cause.
  3. 3
    Say what is wrong. To focus it.

Compare

Learn it properly