python-debugpy

Debug Python code with pdb and debugpy via the Debug Adapter Protocol.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/lxh755818-bot/obsidian-vault --skill python-debugpy-lxh755818-bot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-debugpy
Source: https://github.com/lxh755818-bot/obsidian-vault/tree/main/backup/skills/software-development/python-debugpy
Command: npx skills add https://github.com/lxh755818-bot/obsidian-vault --skill python-debugpy-lxh755818-bot

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires debugpy, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Debugging Python code efficiently can be a complex and time-consuming process. This skill aims to simplify debugging by providing a concise and comprehensive guide on how to use the popular debugging tools, pdb and debugpy, along with remote DAP capabilities.

Core Features & Use Cases

  • Efficient Local and Remote Debugging: Provides recipes and scripts to quickly start debugging in various scenarios including local breakpoints, remote debugging of long-running processes, and post-mortem debugging.
  • Supports Popular Debugging Scenarios: Includes recipes for debugging with breakpoint(), launching scripts under pdb, and integrating with pytest for test failures.
  • Documentation and Quick References: Offers a full reference for all pdb commands, debugging Hermes-specific processes, and troubleshooting common pitfalls.

Quick Start

Execute debugpy listen("127.0.0.1", 5678) and then python your_script.py. Your process will block, waiting for a debug client to attach. Use a client like VS Code CLI or a small script to connect.

Frequently Asked Questions about python-debugpy

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

FAQPage Schema
How do I attach a remote debugger to a running Python script using debugpy?

To attach a remote debugger using debugpy, execute `debugpy listen("127.0.0.1", 5678)` in your script. The process will block and wait for a debug client like VS Code CLI to connect and start the debugging session.

What is the difference between using pdb and debugpy for Python debugging?

Python debugging with pdb operates locally in the terminal, while debugpy uses the Debug Adapter Protocol to enable remote debugging capabilities. This skill provides recipes for both local breakpoints and remote debugging of long-running processes.

Can I use debugpy to debug pytest test failures?

Yes, debugpy supports popular debugging scenarios including integrating with pytest for test failures. You can also use the built-in `breakpoint()` function or launch scripts under pdb to diagnose issues efficiently.

Do I need a specific Python version to integrate debugpy?

Yes, debugpy integration requires Python version 3.7 or higher. The skill applies to any Python project seeking to improve debugging efficiency and provides troubleshooting for common pitfalls.

How does post-mortem debugging work with pdb?

Post-mortem debugging with pdb allows you to inspect the state of a program after it has crashed. This skill offers a full reference for all pdb commands and recipes to quickly start post-mortem debugging in various scenarios.