python-debugpy

Diagnose Python execution failures by inspecting runtime state with pdb and debugpy.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you inspect and fix Python runtime issues when tracebacks, logs, or test output are not enough to explain a failure.

Core Features & Use Cases

  • Local interactive debugging: Use breakpoint() or python -m pdb to stop execution, step through code, and inspect locals in real time.
  • Test failure investigation: Drop into pdb on failing pytest runs, trace execution from the start of a test, or analyze post-mortem exceptions.
  • Remote and long-running process debugging: Attach to running services, daemons, and subprocesses with debugpy or remote-pdb when restarting is impractical.
  • Use case: A Hermes gateway or worker misbehaves in production-like conditions, and this Skill guides you to pause the right process, inspect its state, and continue safely.

Quick Start

Use the python-debugpy skill to choose the right Python debugger for your situation and inspect the failing code path with a local breakpoint, pdb session, or remote attach.

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 service that is already running in production?

Python post-mortem debugging uses pdb to inspect the program state exactly where an exception occurred. By dropping into a post-mortem session, you can analyze the traceback, evaluate locals, and identify the crash cause without restarting.

How do I drop into pdb on a failing pytest run?

You can drop into pdb on a failing pytest run by using the built-in breakpoint() function or pytest's --pdb flag. This pauses test execution at the failure point to trace execution and inspect local variables interactively.

What is the best way to analyze a Python post-mortem crash?

Python post-mortem analysis uses pdb to inspect the program state exactly where an unhandled exception occurred. This lets you evaluate local variables and trace the failure path immediately after a crash without modifying the code.

Can I attach debugpy to a Python subprocess for debugging?

Yes, you can attach debugpy to a Python subprocess to inspect its runtime state. This is useful for diagnosing misbehaving workers or daemons where restarting the parent process is impractical.

When should I use remote-pdb instead of local pdb for Python debugging?

Use remote-pdb instead of local pdb when debugging long-running services or daemons where terminal access is unavailable. Remote-pdb allows you to attach to a running process over a network to pause and inspect execution safely.