{"name":"CLAUDE_CODE_DEBUG_LOGS_DIR","slug":"claude-code-debug-logs-dir","family":"env","title":"Environment variables","noun":"environment variable","description":"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`, `\/debug`, or the `DEBUG` environment variable: setting this variable alone does not enable logging. The [`--debug-file`](\/docs\/en\/cli-reference#cli-flags) flag does both at once. Defaults to `~\/.claude\/debug\/<session-id>.txt`","description_source":"docs","described_by":{"doc":"claude-code\/env-vars","title":"Environment variables"},"presence":{"first_seen":"2.1.138","removed_in":null,"in_current_build":true,"newest_mined":"2.1.309","builds":150,"mined_builds":150,"first_cited":{"version":"2.1.227","released_at":"2026-08-10 20:56:57","spans":3}},"aliases":[],"entries":[{"version":"2.1.301","anchor":"debug-log-file-writing-now-disabled-for-diskless-sessions-vi","heading":"Sessions that don't save to disk no longer write debug log files","line":"Diskless sessions now skip writing debug log files, even when CLAUDE_CODE_DEBUG_LOGS_DIR is set","released_at":"2026-10-15 14:34:23","reason":"found in this entry's text, named in this entry"},{"version":"2.1.283","anchor":"debug-log-writer-gains-a-disable-default-file-switch-that","heading":"Unused switch to stop writing the default debug log file","line":"Debug logging has a new switch to turn off the default log file, but nothing uses it, so logging works as before","released_at":"2026-09-25 18:46:11","reason":"found in this entry's text"},{"version":"2.1.283","anchor":"debug-log-file-writing-can-be-switched-off-unless-a-log-path","heading":"Debug logging can now skip its default log file unless a log path is given","line":"The debug logger can switch off its default log file, but still writes one when a file path or `CLAUDE_CODE_DEBUG_LOGS_DIR` is set","released_at":"2026-09-25 18:46:11","reason":"found in this entry's text, named in this entry"},{"version":"2.1.227","anchor":"debug-logging-rebuilt-around-a-single-logger-instance","heading":"Debug logging rebuilt around a single logger instance","line":"Debug logging now runs through one logger that keeps queued lines when it restarts.","released_at":"2026-08-10 20:56:57","reason":"named in this entry, found in this entry's text"},{"version":"2.0.63","anchor":"slow-operation-detection","heading":"Slow Operation Detection","line":null,"released_at":"2025-12-09 19:44:13","reason":"found in this entry's text"},{"version":"2.0.10","anchor":"debug-log-symlink-management","heading":"Debug Log Symlink Management","line":null,"released_at":"2025-10-07 19:53:56","reason":"found in this entry's text"}],"entries_total":6,"docs":[{"source":"claude-code","path":"env-vars","title":"Environment variables","documented":true},{"source":"claude-code","path":"cli-reference","title":"CLI reference","documented":false}],"docs_total":2,"gates":[],"related":[{"name":"CLAUDE_CODE_DEBUG_LOG_LEVEL","slug":"claude-code-debug-log-level","description":"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"},{"name":"CLAUDE_CODE_DEBUG_REPAINTS","slug":"claude-code-debug-repaints","description":"Set CLAUDE_CODE_DEBUG_REPAINTS to capture which components trigger terminal redraws."}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/claude-code-debug-logs-dir","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}