python-debugpy

Pause Python execution and inspect state via pdb or debugpy DAP.

4|Updated May 18, 2026
One-click install
npx skills add https://github.com/ZardLi1115/zedclaw --skill python-debugpy-zardli1115
Or copy as Structured Prompt for Agentā–¼
Please help me install this Agent Skill.
Skill: python-debugpy
Source: https://github.com/ZardLi1115/zedclaw/tree/main/skills/software-development/python-debugpy
Command: npx skills add https://github.com/ZardLi1115/zedclaw --skill python-debugpy-zardli1115

SYSTEM DOCUMENTATION & REQUIREMENTS

šŸ’” This Skill includes assets (resource) components.

What problem does it solve?

It helps you locate and understand bugs by letting you pause Python execution and inspect runtime state locally with pdb or remotely with debugpy when issues are hard to reproduce.

Core Features & Use Cases

  • Local interactive debugging (pdb): Drop into a REPL at a chosen line using breakpoint() or run a script directly under python -m pdb for fast, targeted investigation.
  • Remote/headless debugging (debugpy + DAP): Attach to long-running processes or child processes (e.g., gateway/daemon/subprocess workers) using DAP so you can debug without restarting.
  • Post-mortem crash inspection: Inspect locals at the exact exception frame using pdb.post_mortem for traceback-driven root-cause analysis.
  • ZedClaw-specific scenarios: Debug pytest failures safely and avoid incompatibilities like pdb under xdist, plus debug persistent worker processes using remote breakpoints.

Quick Start

Ask ZedClaw to help you debug a failing Python test by pausing at the failure location with pdb while ensuring you disable xdist so you actually get an interactive prompt.

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 long-running Python service without restarting it?ā–¼

You can debug Python services without restarting by attaching to the running process. Use debugpy to listen or wait for a client connection, then attach via a DAP-compatible client to inspect state remotely.

How do I inspect local variables at the exact frame where a Python exception occurred?ā–¼

To inspect variables at an exception frame, use post-mortem debugging. By invoking pdb.post_mortem, you can drop into a REPL at the exact traceback location to analyze the program state that caused the crash.

Can I use pdb to debug failing pytest tests interactively?ā–¼

Yes, you can debug failing pytest tests by pausing execution with breakpoint(). You should disable pytest-xdist to ensure you get an interactive prompt instead of encountering incompatibilities with parallel test workers.

How do I debug a Python subprocess or worker process remotely?ā–¼

You can debug subprocess or worker bugs by using debugpy to attach to child processes. This allows remote inspection of gateway or daemon workers using DAP-compatible clients without needing to restart the parent process.

What is the difference between local pdb and remote debugpy for Python debugging?ā–¼

Local pdb drops into a REPL for fast targeted investigation using breakpoint(), while remote debugpy attaches to long-running or headless processes via DAP. Use pdb for quick checks and debugpy for persistent services.