python-debugpy

Debug Python programs by pausing execution and inspecting state via pdb and debugpy.

Updated May 5, 2026
One-click install
npx skills add https://github.com/Z43L/zeus-agent --skill python-debugpy-z43l
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-debugpy
Source: https://github.com/Z43L/zeus-agent/tree/main/skills/software-development/python-debugpy
Command: npx skills add https://github.com/Z43L/zeus-agent --skill python-debugpy-z43l

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When a Python program fails in a way that tracebacks do not explain, this Skill helps you pause execution and inspect state interactively or remotely to find the real cause.

Core Features & Use Cases

  • pdb breakpoints and REPL inspection: Use breakpoint() and standard pdb commands to step through logic, inspect locals, and set targeted breakpoints.
  • debugpy DAP remote debugging: Attach to long-running or headless processes using debugpy so you can debug without restarting the failing service.
  • Post-mortem and test debugging: Inspect exceptions with pdb.post_mortem and debug pytest failures while avoiding pitfalls like xdist interactions.

Quick Start

Start a failing script, add a breakpoint with breakpoint(), and then rerun until the pdb prompt appears so you can inspect the variables that lead to the bug.

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 program when the stack trace doesn't explain the failure?

Debugging a Python program interactively lets you pause execution with breakpoints to inspect state when tracebacks are unclear. You can use pdb commands to step through logic, inspect locals, and identify the exact variables causing the bug.

What's the best way to attach a debugger to a running Python service without restarting it?

Remote debugging with debugpy lets you attach to long-running or headless Python processes via DAP without restarting the failing service. You connect a DAP client to the running process to inspect state and troubleshoot issues live.

Can I debug pytest failures interactively using pdb?

Debugging pytest failures interactively is supported, including guidance on avoiding common pitfalls like xdist interactions. You can step through test logic using pdb breakpoints to inspect variables and understand why specific test assertions fail.

How do I inspect Python exceptions with post-mortem debugging?

Python post-mortem debugging lets you inspect exceptions interactively after a crash using pdb.post_mortem. This drops you into the debugger at the exact failure point so you can examine the stack frames and local variables that led to the error.

Does this debugging approach support both local interactive and remote headless environments?

Python debugging via pdb and debugpy supports both local interactive execution and remote headless environments. You use breakpoint() and pdb for local inspection, while debugpy enables DAP remote attach for long-lived services across different deployment contexts.