python-debugpy

Debug Python code with pdb breakpoints and debugpy remote DAP attach.

Updated Aug 21, 2026
One-click install
npx skills add https://github.com/TylerSimons1127/vibe --skill python-debugpy-tylersimons1127
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: python-debugpy
Source: https://github.com/TylerSimons1127/vibe/tree/main/skills/software-development/python-debugpy
Command: npx skills add https://github.com/TylerSimons1127/vibe --skill python-debugpy-tylersimons1127

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires debugpy, remote-pdb.

What problem does it solve? Python bugs in tests, long-running daemons, and subprocesses are hard to inspect when tracebacks alone don't reveal wrong values, and restarting a misbehaving process isn't an option. ## Core Features & Use Cases - Interactive pdb debugging: Set breakpoints with breakpoint(), step through code, inspect locals, and run post-mortem analysis on exceptions. - Remote debugging with debugpy: Attach to already-running processes via DAP on a TCP port, including PID-based injection for daemons and gateways. - Terminal-friendly remote-pdb: Get a plain (Pdb) prompt over nc for agent-friendly debugging without IDE setup. - Use Case: A gateway subprocess misbehaves in production-like conditions. Add remote_pdb.set_trace() in the handler, trigger it, connect with nc 127.0.0.1 4444, and inspect the suspended frame and pending asyncio tasks. ## Quick Start Add a breakpoint() call at the suspect line in my Python file and walk me through inspecting the variables when it hits.

Frequently Asked Questions about python-debugpy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug Python code with pdb breakpoints?▼

Add breakpoint() at the line you want to inspect and run the script normally to land in an interactive pdb REPL. Use n to step over, s to step into, pp to print expressions, and w to view the call stack.

How to attach a debugger to a running Python process?▼

Use debugpy with python -m debugpy --listen 127.0.0.1:5678 --pid <pid> to inject into a running process, then connect a DAP client. Hardened kernels may require setting /proc/sys/kernel/yama/ptrace_scope to 0.

debugpy vs remote-pdb for terminal debugging?▼

remote-pdb gives a plain (Pdb) prompt over nc with one set_trace() call, making it the cleaner terminal and agent-friendly choice. Use debugpy only when you need IDE integration or thread-aware DAP features.

Why does pdb not work under pytest-xdist or parallel test runners?▼

Parallel and output-capturing runners run tests in captured subprocesses, so the pdb prompt never appears and the test hangs. Run pytest directly on a single file with --pdb for interactive debugging.

Why is my breakpoint() not hitting in Python?▼

Check whether PYTHONBREAKPOINT=0 is set, which disables all breakpoint() calls. Also confirm you are not under a capturing runner and that execution actually reaches the line before the process exits.

Can pdb debug multithreaded or asyncio Python code?▼

pdb only debugs the current thread and does not follow forks. For multithreaded code use debugpy's thread-aware DAP, and for asyncio use interact mode or remote-pdb with asyncio.all_tasks() inspection.