python-debugpy

Debug Python code with pdb, breakpoint(), post-mortem inspection, and debugpy remote attach.

1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/JEROME-PRAKASH-L/openclaw --skill python-debugpy-jerome-prakash-l
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-debugpy
Source: https://github.com/JEROME-PRAKASH-L/openclaw/tree/main/skills/python-debugpy
Command: npx skills add https://github.com/JEROME-PRAKASH-L/openclaw --skill python-debugpy-jerome-prakash-l

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires debugpy.

What problem does it solve? Python bugs involving hidden locals, confusing state mutation, failing tests, subprocesses, or long-running services are hard to diagnose with print statements alone. This Skill guides interactive debugging so you can stop at the exact bad frame and inspect real program state. ## Core Features & Use Cases - Debugger Selection: Chooses the smallest tool for the job, from breakpoint() for local code to python3 -m pdb for no-edit launches and debugpy for remote or headless processes. - Remote and PID Attach: Starts debugpy listeners on 127.0.0.1, waits for DAP clients, or attaches to an already-running process by PID. - Post-Mortem Inspection: Captures tracebacks with pdb.post_mortem so unhandled exceptions can be examined after failure. - Use Case: A test suite fails only inside a worker pool. Disable parallel workers, run python3 -m pdb -c continue on the failing test, and inspect the exact frame where state diverges. ## Quick Start Ask the assistant to debug your failing Python script with pdb or attach debugpy to the running process so you can inspect variables at the point of failure.

Frequently Asked Questions about python-debugpy

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

FAQPage Schema
How do I debug a Python script with pdb?

Run python3 -m pdb path/to/script.py to launch the script under the debugger from the beginning, or add breakpoint() in your source to stop at a specific line. Use n to step, s to step into, and p expr to inspect values.

How to attach a debugger to a running Python process?

Use python3 -m debugpy --listen 127.0.0.1:5678 --pid <pid> to attach debugpy to a running process by PID. On Linux, if attach fails, check ptrace and container privileges before modifying the target.

What is the difference between pdb and debugpy?

pdb is a terminal debugger best for local code you can launch or edit directly. debugpy speaks the Debug Adapter Protocol and suits remote, headless, or already-running processes where a DAP client connects over a port.

Why does pdb not work inside parallel test workers?

Interactive stdin usually breaks inside worker pools, so pdb cannot accept commands there. Disable parallel test workers and rerun the failing test in a single process before starting the debugger.

How do I disable breakpoint() calls in Python?

Set the environment variable PYTHONBREAKPOINT=0 to disable all breakpoint() calls without editing source. Before committing, also search for leftover breakpoint(), pdb.set_trace, and debugpy references and remove them.