/tool:debuggingfrom tool
Use when a program misbehaves at runtime and its cause is unproven (crash, hang, wrong value, breakpoint that never stops), covering the method from stop to report, debugger sessions, breakpoints, stops, hang and crash evidence, and cleanup
Ships in tool. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Derang runs as the Tool plugin's debugger MCP server. Use it to stop and inspect programs with runtime defects. Use macOS stack and crash reports when a program hangs or exits.
debugging skill of the program's language or host for its launch forms, attach routes, and runtime stack toolscode:test for the test that keeps a fixed defect fixedEvery runtime defect runs these steps in order, each finished before the next:
<X> causes it, as changing <Y> removes it, weighed against one rival cause the same stop rules outEvidence rules:
unhit breakpoints prove unreached code only after a breakpoint near them stopped in the same run, as adapters bind lines of code never loadedlog breakpoints before any edit to the sourceAttempts stop at these limits, then report what each tried:
| [INDEX] | [LOOP] | [LIMIT] | [THEN] |
|---|---|---|---|
| [01] | Waits answering state: running | 4 | pause, read every thread, move the breakpoints |
| [02] | Attach by one route | 1 | Next route, refusal quoted |
| [03] | Fixes with no proof | 3 | Stop, name what each fix changed |
| [04] | Attempts at a tool or host defect | 2 | Stop, hand over the evidence |
| [05] | Searches for a reproduction | Each route once | Stop, name the artifact that would decide it |
Program state decides the first call:
| [INDEX] | [PROGRAM] | [ROUTE] |
|---|---|---|
| [01] | Fails from a command or test | session launch with breakpoints |
| [02] | Running with state worth keeping | session attach by pid, address, or websocket |
| [03] | Running and hung | sample, then attach and pause to read the frames it names |
| [04] | Ended in a crash it repeats | Crash report, then launch, which stops at the fault |
| [05] | Ended in a crash it does not repeat | Crash report or core alone |
Answers lead with rows of what any session did since the previous call, then rows of the session called:
| [INDEX] | [ROW] | [MEANING] |
|---|---|---|
| [01] | state: stopped, <reason> | Stop on a breakpoint, step, exception, pause, or signal |
| [02] | exception: <id>, trace: <line> | Exception of the stop with its message and stack text |
| [03] | frame <i>: <function>, <file>:<line> | Frame of the stopped thread, 0 the top |
| [04] | frames <a>-<b>: external, no source | Run of frames with no source on disk |
| [05] | local <name>: <value>, type <T>, ref <n> | Local of the first frame with source, ref naming its children |
| [06] | changed <name>: <before> -> <after> | Local a repeated stop in one frame changed, changed: none alone |
| [07] | state: exited, code <n> | Program ended |
| [08] | unhit <file>:<line> | Breakpoint bound and never stopped before the exit |
| [09] | unbound <file>:<line> | Breakpoint never bound before the exit |
| [10] | output: <line> | Program or adapter line printed since the last answer |
| [11] | child <n>: <name> | Child process the session follows |
| [12] | session <m> state: <state> | Another session stopped or ended |
| [13] | state: running | Program runs: run the code path, then resume wait |
- <tool> {<arguments>} name the call that reads more or waits againnext: row naming the call that recoverssession wherever another agent starts sessions on one connection, as each start moves the targetCall breakpoints with no edits to list states, stop counts, and declared exception filters. Give one form per breakpoint:
file with line or statement -> source line, column picking one function of a line holding more in JavaScript and C#function -> entry of a named function, where the adapter declares function breakpointswatch with the reference of its scope or value -> write or read of a variable in native code, its watch dropped once the process endsexceptions with a condition -> exception type in Python, expression where the adapter takes oneBreakpoint states and the next action:
bound -> adapter accepted the line, no proof that a loaded copy of the code runs itbound, moved to line <n> -> asked line holds no code, and the stop comes at line <n>pending -> module not loaded yet, reading bound once it loadsfailed -> adapter refused the line, its message followingrestart reuses the requested line numbers, including those found by statement matching. Launch again by statement when an edit moves the code.
Calls written <tool> <value> name a tool and its main argument: read scopes reads of scopes, resume wait takes action wait, and repl <command> is evaluate with context repl.
Rules at a stop:
resume, as a step over an unread stop loses a value that movedReadings and the next action:
Not allowed to attach to process, or no reason) -> hardened binary lacking get-task-allow: launch an own buildbound and no stop where the code ran -> read modules for which copy loaded, then rebuild a binary that predates the editpending after the module loaded -> read modules symbol status, then dwarfdump --uuid for native codeFlags of codesign -dv <binary> holding runtime mark a hardened binary, which attaches only with com.apple.security.get-task-allow in codesign -d --entitlements - <binary>. Copies re-signed with it attach and lose grants keyed to the original signature.
Hang of a live process, read with no session:
sample <pid> 2 1 -file <report>: every thread's stack over 2 seconds at 1 ms, of a hardened process refusing attach toosudo spindump <pid> 2 10 -onlyTarget -o <report>: wait reasons and kernel frames, Deadlocked: naming threads waiting on each otherattach, then pause or a breakpoint at that framedebugging skillCrash with no live process:
ls -t ~/Library/Logs/DiagnosticReports/<process>-*.ips lists reports newest first, system daemons' under /Library/Logs/DiagnosticReportsxcrun crashlog -t <binary> <report>.ips </dev/null prints the crashed thread with file, line, and source-t names a build whose UUID the report holds, as reports can redact its path (/private/tmp/*/<binary>) and lose file and linelaunch stops at the faulting instruction with frames and locals, no breakpoint neededCores:
evaluate repl process save-core --style modified-memory <path> writes a core of a stopped native sessionget-task-allow on their binary, ulimit -c unlimited in its launching shell, and /cores writable by its userxcrun lldb --batch -c <core> -o 'thread backtrace all' -- <binary> reads every thread of oneSymbols of native code:
dwarfdump --uuid <binary> <binary>.dSYM prints both UUIDs, which match where file and line resolvenm -ap <binary> | rg ' OSO ' lists them, and LLDB refuses one changed since the linkdsymutil <binary> writes the dSYM from those object filesCleanup removes what the session added:
/cores takes back its modesession list answers sessions: none at the enddetach answer row program: and its next action:
ended, running -> releasedstopped -> ps -o stat= -p <pid> starting T takes one kill -CONT <pid>left running, left suspended ..., may be left suspended ..., unread ... -> its answered request or new log line proves it runs, else end itReport block, filled whole:
Symptom: <one sentence: error or value, process, build>
Reproduced: <command> -> <output> | no, because <difference>
Evidence: <file:line, frame, value, artifact path>
Cause: <one sentence> | unproven
Fix: <file:line, change> | none
Proof: <command> -> <output>
Left open: <what was not verified, the probe that would settle it>
Removed: <sessions, breakpoints, files, signals>
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub bsamiee/rasm --plugin tool6 skills in this plugin
/ghidraUse when reading, annotating, or emulating a binary through Ghidra, covering headless scripts and the Serve process/googleUse when work reads or writes any Google account or service (Gmail, Calendar, Drive, Docs, Sheets, Slides, Contacts, Tasks, Forms, Chat, Keep, YouTube, Apps Script, Cloud APIs, Workspace admin) or drives the owner's signed-in Chrome, web and chrome:// pages alike, covering account routing across gog, GAM, and Drive mounts, output shapes, edits, misleading errors, and Chrome settings, flags, and extensions through chrome-devtools/inspectUse when code for a vendor host (plug-in, extension, script, MCP client) needs a fact its documentation lacks or contradicts, covering evidence order across installed files, host state, binaries, and a running instance/phoneUse when work reads or drives the owner's paired iPhone from this Mac (screenshots, taps, typing, apps, URLs, pasteboard, settings, location, logs, files, metrics), covering devicectl, Device Hub's mirror driven through Rasad for taps and typing, pymobiledevice3 input when Device Hub cannot act, lock and owner steps, and Xcode's simulator-only DeviceInteraction tools/storageUse when measuring or freeing space on the Mac, folders, cloud drives, VPS machines, or Docker engines, covering APFS clones, duplicates, litter, and cleans