Agent skill · nousresearch

python-debugpy

Debug Python: pdb REPL + debugpy remote (DAP).

What it needs

About 9k tokens when loaded.

What this skill does

Python Debugger (pdb + debugpy) Overview Three tools, picked by situation: Tool When --- --- breakpoint() + pdb Local, interactive, simplest. Add breakpoint() in the source, run normally, get a REPL at that line. python -m pdb Launch an existing script under pdb with no source edits. Useful for quick poking. debugpy Remote / headless / "attach to already-running process." Talks DAP, scriptable from terminal, works for long-lived processes (gateway, daemon, PTY children). Start with breakpoint(). It's the cheapest thing that works. When to Use A test fails and the traceback doesn't reveal why a value is wrong You need to step through a function and watch a collection mutate A long-running process (hermes gateway, tuigateway) misbehaves and you can't restart it Post-mortem: an exception fired in prod-ish code and you want to inspect locals at the crash site A subprocess / child (Python SlashWorker, PTY bridge worker) is the actual bug site Don't use for: things print() / logging.debug solve in under a minute, or things pytest -vv --tb=long --showlocals already reveals. pdb Quick Reference Inside any pdb prompt ((Pdb)): Command Action --- --- h / h cmd help n next line (step over) s step into r return from current function c continue unt N continue until line N j N jump to line N (same function only) l / ll list source around current line / full function w where (stack trace) u / d move up / down in the stack a print args of the current function p expr / pp expr print / pretty-print expression display expr auto-print expr on every stop b file:line set breakpoint b func break on function entry b file:line, cond conditional breakpoint cl N clear breakpoint N tbreak file:line one-shot breakpoint !stmt execute arbitrary Python (assignments included) interact drop into full Python REPL in current scope (Ctrl+D to exit) q quit The interact command is the most powerful — you can import anything, inspect complex objects, even call methods that mutate state. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills nousresearch/python-debugpy--cd1e0c

View the source on GitHub

Browse the @skills marketplace