[DOCS] Document that `DEBUG` environment variable enables debug mode

Resolved 💬 1 comment Opened May 14, 2026 by tevansuk Closed Jun 12, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/env-vars.md

Section/Topic

Env variables

Current Documentation

The docs list a few flags that control debug:

| CLAUDE_CODE_DEBUG_LOGS_DIR | Override the debug log file path. Despite the name, this is a file path, not a directory. Requires debug mode to be enabled separately via --debug or /debug: setting this variable alone does not enable logging. The [--debug-file](/en/cli-reference#cli-flags) flag does both at once. Defaults to ~/.claude/debug/<session-id>.txt |

| CLAUDE_CODE_DEBUG_LOG_LEVEL | Minimum log level written to the debug log file. Values: verbose, debug (default), info, warn, error. Set to verbose to include high-volume diagnostics like full status line command output, or raise to error to reduce noise

What's Wrong or Missing?

It is not documented that DEBUG=1 enables debug mode

Suggested Improvement

  • Add DEBUG to the list of documented environment variables
  • Add _Requires debug mode to be enabled separately via --debug or /debug or the DEBUG environment variable:_ to the description of CLAUDE_CODE_DEBUG_LOGS_DIR

Impact

Low - Minor confusion or inconvenience

Additional Context

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗