python-debugpy

Debug Python applications locally, remotely, and post-mortem with pdb and debugpy.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/ashiqcodeleaf/long-Run-Agents --skill python-debugpy-ashiqcodeleaf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-debugpy
Source: https://github.com/ashiqcodeleaf/long-Run-Agents/tree/main/skills/software-development/python-debugpy
Command: npx skills add https://github.com/ashiqcodeleaf/long-Run-Agents --skill python-debugpy-ashiqcodeleaf

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill unit provides a comprehensive guide to debugging Python applications using pdb and debugpy, offering solutions for local, remote, and post-mortem debugging scenarios.

Core Features & Use Cases

  • Local Debugging: Offers a quick and simple way to add breakpoints and step through code for interactive debugging.
  • Remote Debugging: Allows attaching to running processes for debugging long-lived applications like gateways and daemons.
  • Post-Mortem Debugging: Helps investigate exceptions and crashes in production code by inspecting locals at the crash site.
  • Use Case: If you encounter a bug in a long-running Python process and need to understand the state of the process at the time of the error, this Skill unit provides the necessary tools and techniques.

Quick Start

To start debugging a script, add a breakpoint() at the desired location and run the script. If you need to debug a running process, use the debugpy tool to attach to the process and inspect it.

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 running Python process remotely?

To debug a running Python process remotely, you can use debugpy to attach to the live process. This allows you to inspect long-lived applications like gateways and daemons without restarting them.

What is post-mortem debugging in Python and when do I need it?

Post-mortem debugging in Python investigates exceptions and crashes by inspecting local variables at the exact crash site. You need it to analyze production errors after they occur.

How do I set a breakpoint to step through Python code locally?

To debug Python code locally, add a breakpoint() call at your desired location and run the script. This pauses execution so you can interactively step through the code.

Can I inspect variable states and execution flow with pdb and debugpy?

Yes, pdb and debugpy enable detailed inspection of variable states and execution flow. They provide the necessary commands to evaluate expressions and step through application logic.

What is the best way to debug a long-running Python daemon?

The best way to debug a long-running Python daemon is attaching debugpy to the running process. This remote debugging technique lets you investigate the process state at the time of an error.