[DOCS] /debug command docs outdated — does not reflect mid-session toggle behavior

Resolved 💬 4 comments Opened Mar 7, 2026 by coygeek Closed Apr 28, 2026

Documentation Type

Incorrect/outdated documentation

Documentation Location

https://code.claude.com/docs/en/slash-commands

Section/Topic

/debug command description

Current Documentation

slash-commands.md describes /debug as:

* **/debug [description]**: troubleshoots your current Claude Code session by reading the session debug log. Optionally describe the issue to focus the analysis.

features-overview.md lists /debug as a bundled skill alongside /simplify and /batch, with no description of its current behavior.

cli-reference.md documents the --debug CLI flag (category filtering for startup) but does not cross-reference the /debug slash command or its mid-session toggle.

What's Wrong or Missing?

The changelog entry for v2.1.71 states:

"Updated /debug to toggle debug logging on mid-session, since debug logs are no longer written by default"

The current documentation describes /debug as a command that reads the session debug log. This is now outdated: the primary function of /debug has changed. Debug logs are no longer written by default, so there is nothing to read until /debug is invoked to toggle logging on for the current session.

The behavior change has two parts that need documenting:

  1. Debug logs are off by default — previously they were written to disk continuously; now they are not.
  2. /debug toggles debug logging on for the current session — rather than reading a pre-existing log, the command enables log writing from that point forward.

Users following the old description ("reads the session debug log") will find it does not match actual behavior. Users trying to diagnose issues who expect a debug log file to exist will be confused when none exists.

Suggested Improvement

Update the /debug entry in slash-commands.md:

Before:

* **/debug [description]**: troubleshoots your current Claude Code session by reading the session debug log. Optionally describe the issue to focus the analysis.

After:

* **/debug**: Toggles debug logging on for the current session. Debug logs are not written by default; run /debug mid-session to enable them. Use claude --debug at startup to enable debug logging from the beginning of a session.

Also update features-overview.md if it contains a description of /debug.

Add a cross-reference from the --debug CLI flag entry in cli-reference.md to the /debug slash command, noting the distinction (startup vs. mid-session).

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/slash-commands | /debug description is stale |
| https://code.claude.com/docs/en/cli-reference | --debug flag has no cross-reference to mid-session toggle |

Total scope: 2 pages affected

Source: Changelog v2.1.71

Exact changelog entry:

"Updated /debug to toggle debug logging on mid-session, since debug logs are no longer written by default"

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗