python-debugpy

Debug Python code interactively across local, remote, and headless environments.

Updated May 7, 2026
One-click install
npx skills add https://github.com/MOODMNKY-LLC/mnky-atlas --skill python-debugpy-moodmnky-llc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-debugpy
Source: https://github.com/MOODMNKY-LLC/mnky-atlas/tree/main/skills/python-debugpy
Command: npx skills add https://github.com/MOODMNKY-LLC/mnky-atlas --skill python-debugpy-moodmnky-llc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Debugging Python code is often frustrating when dealing with hidden local variable state, confusing state mutations, failing tests, subprocesses, long-running services, or remote/headless environments where standard debugging tools don't work out of the box.

Core Features & Use Cases

  • Multi-Method Debugging Support: Choose between lightweight breakpoint() for local code with source edit access, built-in pdb for launching from the start without source edits, and debugpy for remote/headless processes, already-running PIDs, or service startup race conditions.
  • Post-Mortem & Edge Case Handling: Includes built-in support for post-mortem debugging after unhandled exceptions, plus guidance for common edge cases like disabled parallel test workers, PID attach privilege issues, and cleanup of debug hooks before commit.
  • Use Case: A developer debugging a failing test in a CI environment can use python3 -m pdb -c continue to stop exactly at the unhandled exception, or attach debugpy to a long-running staging service to inspect state without restarting it.

Quick Start

Use the python-debugpy skill to debug the failing Python script by stepping through execution and inspecting variable state to identify the root cause of the error.

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 script that fails on startup without modifying the source code?

Debug a Python script without source modifications by launching it directly with built-in pdb from the start, allowing you to step through execution and inspect variables before the error occurs.

Can I attach a debugger to an already running Python process?

Yes, you can attach debugpy to an already running Python process by targeting its PID, which allows you to inspect the live state of long-running services without restarting them.

What is the best way to inspect local variables after an unhandled exception in Python?

Inspect local variables after an unhandled exception by using post-mortem debugging, which drops you into an interactive session at the exact point of failure to examine the hidden application state.

How do I debug a long-running Python service in a remote or headless environment?

Debug long-running Python services in remote or headless environments by using debugpy remote attach functionality, connecting your local debugger to the remote process to inspect state interactively.

Does python-debugpy support debugging failing tests in CI with parallel workers?

Debugging failing tests in CI is supported, but you may need to disable parallel test workers to ensure the interactive debugger attaches correctly and stops at the unhandled exception.

When should I use breakpoint() instead of pdb for Python debugging?

Use the lightweight breakpoint() hook when you have local source edit access for quick inspection, and use built-in pdb when you need to launch debugging from the start without altering the source.