ada-python-debugpy

Debug Python code interactively using pdb, breakpoint(), and debugpy remote attach.

Updated Jul 23, 2026
One-click install
npx skills add https://github.com/wubing7755/Ada --skill ada-python-debugpy-wubing7755
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ada-python-debugpy
Source: https://github.com/wubing7755/Ada/tree/main/skills/software-development/ada-python-debugpy
Command: npx skills add https://github.com/wubing7755/Ada --skill ada-python-debugpy-wubing7755

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires debugpy, remote-pdb.

What problem does it solve? When a Python test fails or a long-running process misbehaves and tracebacks alone don't reveal the cause, this Skill provides structured recipes for interactive debugging: stepping through code, inspecting locals, attaching to running processes, and performing post-mortem analysis. ## Core Features & Use Cases - Local interactive debugging: Use breakpoint() and pdb commands to step through code, inspect locals, and mutate state at runtime. - Pytest debugging: Drop into pdb on test failures with --pdb, handle xdist conflicts, and inspect locals with --showlocals. - Remote and post-mortem debugging: Attach debugpy or remote-pdb to long-running processes, daemons, and subprocesses, or inspect crash frames after exceptions. - Use Case: A pytest test passes alone but fails in the suite. Run it with --pdb -n 0 to trap at the exact failure point, inspect accumulated state, identify the root cause, then clean up breakpoints and re-verify. ## Quick Start Ask the agent to debug a failing Python test by dropping into pdb at the failure point and inspecting the local variables.

Frequently Asked Questions about ada-python-debugpy

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

FAQPage Schema
How do I debug a failing pytest test with pdb?

Run pytest with the --pdb flag to drop into pdb when a test fails, or --trace to break at the test start. Add --showlocals --tb=long to see local variables in tracebacks without entering the debugger.

What is the difference between pdb, debugpy, and remote-pdb?

pdb with breakpoint() is simplest for local interactive debugging. debugpy speaks DAP for IDE attach and remote processes. remote-pdb gives a plain pdb prompt over a TCP socket, which is the cleanest choice for terminal-based agents.

Why does pdb not work when running pytest with xdist?

pdb does not work under pytest-xdist because tests run in worker processes without an interactive terminal; the test hangs silently. Disable xdist for the debug run with -n 0 or -p no:xdist.

How do I attach a debugger to an already-running Python process?

Use python -m debugpy --listen 127.0.0.1:5678 --pid <pid> to inject debugpy into the running process, then attach a DAP client. On hardened kernels you may need to set ptrace_scope to 0 first.

Why is my breakpoint() call not hitting?

Check whether PYTHONBREAKPOINT=0 is set, which disables all breakpoint() calls. Also confirm you are not running under pytest-xdist and that execution actually reaches the line before any attach timeout.

When should I not use an interactive Python debugger?

Skip pdb when print() or logging solves the problem quickly, when pytest --showlocals already reveals the cause, or in non-interactive CI environments where a breakpoint would block the process indefinitely.