skills/debugging-code/SKILL.md
Interactively debug source code — set breakpoints, step through execution line by line, inspect live variable state, evaluate expressions against the running program, and navigate the call stack to
npx skillsauth add ranbot-ai/awesome-skills debugging-codeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when you need interactively debug source code — set breakpoints, step through execution line by line, inspect live variable state, evaluate expressions against the running program, and navigate the call stack to trace root causes. Use when a program crashes, raises unexpected exceptions, produces...
Use when a program crashes, produces wrong output, or you need to understand exactly how execution reached a particular state — and running it again with more print statements won't give you the answer fast enough.
You can pause a running program at any point, read live variable values and the call stack at that exact moment, step forward line by line or jump to the next breakpoint, and evaluate arbitrary expressions against the live process — all without restarting.
This skill uses dap, a CLI tool that background daemon to interact with the debugger via the DAP Protocol, maintain
the debugger state, so you can simply interact with it with multiple calls.
If dap isn't installed (check: command -v dap), install it NOW.
Ask/notify the user before proceeding to install it.
From Homebrew (macOS)
brew install AlmogBaku/tap/dap
Installer script:
bash scripts/install-dap.sh
Install from sources:
go install github.com/AlmogBaku/debug-skill/cmd/dap@latest
This tool is open-sourced and available on GitHub, maintained and follows best practices.
Supports natively Python, Go, Node.js/TypeScript, Rust, C/C++, and any other language that supports DAP.
If a debugger backend is missing or fails to start, see references/installing-debuggers.md
For all commands and flags: dap --help or dap <cmd> --help.
dap debug <file> launches the program under the debugger. Backend is auto-detected from the file extension.
Choose your starting strategy based on what you know:
dap debug script.py --break script.py:42dap debug script.py --break "script.py:42:x > 5" (
always quote specs with conditions)--break src/api/routes.py:55 --break src/models/user.py:30dap debug script.py --stop-on-entry (avoid for large projects —
startup code is noisy; bisect with breakpoints instead)dap debug script.py --break-on-exception raised (Python) / all (Go/JS)dap debug --attach host:port --backend <name>dap debug --pid <PID> --backend <name>
macOS + Go gotcha:
dlv --pidrequires SIP disabled (csrutil disable). Prefer starting the program under the debugger instead or attaching to a remote debugger!
Session isolation: --session <name> keeps concurrent agents from interfering.
Tip: You might want to use your session id(${CLAUDE_SESSION_ID}) if available.
Run dap debug --help for all flags, backends, and examples.
Reach for a debugger when reading source alone can't validate the root cause. A debugger lets you observe what does happen: actual values, actual path, actual state. When that diverges from what should happen, you've found your bug.
Two strikes, rethink. If two hypotheses fail at the same location, your mental model is wrong. Re-read the code, form a completely different theory with different breakpoints.
Escalate gradually. Start with dap eval to test a quick hypothesis. Use conditional breakpoints
to filter noise. Fall back to full breakpoints + stepping only when you need interactive control.
Mimic the user journey. If you're debugging a user flow, set breakpoints along the path you expect the code to take.
If you expected compute() to be called, but it never is, then the bug is in the caller — not compute(), but whatever
was supposed to call it.
Set breakpoints instead of prints. When you feel the urge to print something, set a breakpoint instead.
Every dap execution command returns full context automatically: current location, source, locals, call stack, and
output. At each stop, ask:
Trace causation up the stack. If a value is wrong at frame 0, check dap eval "<expr>" --frame 1 to see what the
caller passed. Keep going up (--frame 2, --frame 3) until you find the frame where the value first became wrong —
that's the origin of the bug, not the symptom.
Example output at a stop:
Stopped at compute() · script.py:41
39: def compute(items):
40: result = None
tools
Use when a user asks to mine or update a private, evidence-backed work profile from local Claude Code, Codex, Copilot CLI, or OpenCode sessions.
data-ai
Use when diagnosing Android overheating, idle heat, thermal throttling, charging or radio heat, or abnormal battery drain with read-only ADB evidence and approval gates.
research
Research public competitor ads, analyze creative patterns and landing pages, and produce an evidence-labeled strategic teardown.
tools
Compiled CLI covering all 52 endpoints of the Anytype local API — objects, properties, tags, search, chat, files — one binary, no MCP server needed.