xilele777/poirot/python-debugpy
Claude Code and agent skill by xilele777/poirot
- community
Checking that the SKILL.md file is still in the repository.
Debug Python: pdb REPL + debugpy remote (DAP).
Install
npx vskill@latest install xilele777/poirot/python-debugpySKILL.md
Python Debugger (pdb + debugpy)
Overview
Three tools, picked by situation:
| Tool | When | |
|---|---|---|
| `breakpoint()` + pdb | Local, interactive, simplest. Add breakpoint() in source, run, get REPL. | |
| `python -m pdb` | Launch script under pdb with no source edits. | |
| `debugpy` | Remote / headless / attach to running process. DAP, scriptable. |
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 misbehaves and you can't restart it
- Post-mortem: an exception fired and you want to inspect locals at crash site
- A subprocess 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) | |
b N | set breakpoint at line N | |
b file:N | set breakpoint in another file | |
b func | set breakpoint at function | |
cl N | clear breakpoint N | |
l | list 11 lines around current | |
ll | list whole function | |
w / where | show call stack | |
u / d | move up/down stack frame | |
p expr | print expression | |
pp expr | pretty-print expression | |
a | print args of current function | |
args | same as a | |
display expr | watch expression (re-eval each step) | |
interact | drop into interactive Python REPL |
Using breakpoint()
Run normally:
Using python -m pdb (no source edits)
Post-mortem debugging
Drop into pdb at the exact exception site:
Or:
debugpy (remote attach)
For long-running processes or headless debugging:
Attach from another terminal (DAP client):
Or use any DAP-compatible editor (VS Code, Neovim) to attach to port 5678.
Common Debugging Patterns
Watch a variable change
Conditional breakpoint
Inspect a running subprocess
Pitfalls
- breakpoint() in production: remove before commit. Use
breakpoint()only
for local debugging.
- pdb + multiprocessing: child processes don't inherit the pdb prompt.
Use debugpy for multi-process debugging.
- pdb + asyncio: pdb works but async stack traces can be confusing. Use
w (where) to see the full async call stack.
- Windows + pdb: some pdb features work differently on Windows. `python -m
pdb is more reliable than breakpoint()` in some Windows terminals.
- debugpy port conflicts: default port 5678 may be taken. Use
--listen 5679.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpoirot/backend/agents/skill/builtin_skills/software-development/python-debugpy/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/xilele777/poirot/python-debugpy)