Answer: Start Claude Code with `--debug` or `--debug-file ` to write the debug log, then in another terminal follow the file and filter for your mod's name with `tail -f ./mod-debug.log | grep first-mod`. A mod that loaded has a line naming it and listing the events it handles. Status: Confirmed Entry: tool/claude-code/troubleshooting/read-debug-log Revision: 3 Digest: sha256:56c65ea161576ff4 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:05:20Z Last changed: 2026-11-20T12:23:56Z (loaded mod line example: — → hooks module first-mod@inline loaded (worker, environment 2, tier user); events: session.start,tool.call,command.run,ui.render) Last verified: 2026-11-20T12:23:56Z Next check: 2026-11-21T12:23:56Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of debug flag | --debug | [1] | 2026-11-20 debug file flag | --debug-file | [1] | 2026-11-20 example command | claude --debug-file ./mod-debug.log --plugin-dir ./first-mod | [1] | 2026-11-20 follow and filter command | tail -f ./mod-debug.log | grep first-mod | [1] | 2026-11-20 loaded mod line example | hooks module first-mod@inline loaded (worker, environment 2, tier user); events: session.start,tool.call,command.run,ui.render | [1] | 2026-11-20 custom log call | $.ui.log('message', { to: 'debug' }) | [1] | 2026-11-20 Sources: [1] Anthropic. "Troubleshoot a mod". https://code.claude.com/docs/en/plugins/mods/troubleshoot.md Role: primary. Accessed: 2026-11-20T12:23:56Z Quote: "start Claude Code with `--debug`, or with `--debug-file ` to choose where it goes" (Supports: debug flag) Quote: "or with `--debug-file ` to choose where it goes" (Supports: debug file flag) Quote: "claude --debug-file ./mod-debug.log --plugin-dir ./first-mod" (Supports: example command) Quote: "tail -f ./mod-debug.log | grep first-mod" (Supports: follow and filter command) Quote: "hooks module first-mod@inline loaded (worker, environment 2, tier user); events: session.start,tool.call,command.run,ui.render" (Supports: loaded mod line example) Quote: "$.ui.log('message', { to: 'debug' })" (Supports: custom log call) Published: 2026-11-20T03:00:59Z Snapshot SHA-256: 782ac923e4f73ee0bdb3a5512852310618c2666d6655dc230d953b5a543c12a4 (captured 2026-11-19T12:19:18Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-19T12:19:18Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:23:56Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:23:56Z Last attempt: 2026-11-20T12:23:56Z Notes and limitations: Extracted automatically from a single official source (section "Read the debug log"). Related: https://latestn.com/tool/claude-code/troubleshooting/reload-and-test-mod How do I reload and test a Claude Code mod after changing it? https://latestn.com/tool/claude-code/troubleshooting/repository-not-listed Why isn't my repository listed in Add a repository for Claude Code Review? https://latestn.com/tool/claude-code/troubleshooting/reset-login How do I reset my login in Claude Code? https://latestn.com/tool/claude-code/troubleshooting/plugin-disabled-user-settings-still-loads Why does a Claude Code plugin that I disabled in user settings still load? https://latestn.com/tool/claude-code/troubleshooting/plugin-update-changed-nothing Why didn't my Claude Code plugin update change anything? https://latestn.com/tool/claude-code/troubleshooting/process-exit-code-n How do I troubleshoot a Claude Code process that exits with code N in the Agent SDK? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-20T12:23:56Z | changed | loaded mod line example: — → hooks module first-mod@inline loaded (worker, environment 2, tier user); events: session.start,tool.call,command.run,ui.render | [1] 2026-11-20T12:23:56Z | changed | loaded mod log line: hooks module first-mod@inline loaded (worker, environment 2, tier user); events: session.start,tool.call,command.run,ui.render → — | [1] 2026-11-16T12:11:36Z | changed | loaded mod log line: — → hooks module first-mod@inline loaded (worker, environment 2, tier user); events: session.start,tool.call,command.run,ui.render | [1] 2026-11-16T12:11:36Z | changed | follow and filter command: — → tail -f ./mod-debug.log | grep first-mod | [1] 2026-11-16T12:11:36Z | changed | reload failure message: reload failed, the previous version stays loaded: → — | [1] 2026-11-16T12:11:36Z | changed | loaded mod line example: hooks module first-mod@inline loaded (worker, environment 2, tier user); events: session.start,tool.call,command.run,ui.render → — | [1] 2026-11-16T12:11:36Z | changed | filter command: tail -f ./mod-debug.log | grep first-mod → — | [1] 2026-11-13T03:05:20Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/troubleshooting/read-debug-log/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/troubleshooting/read-debug-log POST: https://latestn.com/dispute/tool/claude-code/troubleshooting/read-debug-log with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/troubleshooting/read-debug-log?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I read the Claude Code debug log to troubleshoot a mod? Revision 3, last verified 2026-11-20T12:23:56Z. https://latestn.com/tool/claude-code/troubleshooting/read-debug-log (accessed 2026-11-21T09:53:19Z). @misc{LatestN_tool_claude_code_troubleshooting_read_debug_log_r3, title = {How do I read the Claude Code debug log to troubleshoot a mod?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/troubleshooting/read-debug-log}}, note = {Revision 3; digest sha256:56c65ea161576ff4; last verified 2026-11-20T12:23:56Z; accessed 2026-11-21T09:53:19Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/troubleshooting/read-debug-log