debugpy

Microsoft's Debug Adapter Protocol debugger for Python used by VS Code

Tool
PyPI
v1.8.21
2,456stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
85/100Excellent
Development Activity84
Maintenance88
Community68
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
79/100Good
Architecture84
Code Quality85
Innovation78
Learning Curve70

debugpy is Microsoft’s debugger for Python 3, implementing the Debug Adapter Protocol (DAP) so editors and IDEs can drive step debugging, breakpoints, variable inspection, and expression evaluation over a standard wire protocol. It is the debugger that powers the Python extension in Visual Studio Code.

Beyond editor integration, debugpy can be launched from the command line or imported directly to enable remote and attach-based debugging of running processes. It builds on a vendored copy of the battle-tested pydevd debugging engine and is one of the most-downloaded packages in the Python ecosystem.

What You Get

  • A full Debug Adapter Protocol server for Python 3 that any DAP editor can drive
  • Command-line launch (python -m debugpy) plus a small public API for listen/attach/wait
  • Remote and attach debugging of already-running processes across the network
  • A vendored pydevd engine providing fast, mature breakpoint and stepping support

Common Use Cases

  • Step-debugging Python code from Visual Studio Code and other DAP editors
  • Attaching a debugger to a long-running or remote Python process
  • Debugging code running inside containers or on remote servers via listen/attach

Under The Hood

Architecture - debugpy is organized under src/debugpy into distinct components: an adapter/ that speaks the Debug Adapter Protocol to editors, a launcher/ that starts the debuggee process, a server/ that hosts the in-process debug logic, and a common/ layer of shared messaging utilities. public_api.py exposes the user-facing entry points (listen, connect, wait_for_client, breakpoint), while _vendored/ bundles the pydevd engine that performs the actual tracing and breakpoint work. __main__.py provides the python -m debugpy CLI.

Tech Stack - The project is Python-first with a vendored native pydevd/pydevd-python-frame-eval acceleration layer for fast tracing. It is packaged via setup.py/pyproject.toml with versioneer for version management, tested with pytest and tox across many Python versions, and built/released through Azure Pipelines.

Code Quality - The repo carries an extensive tests/ suite, pytest configuration, tox multi-version matrices, a documented troubleshooting guide, a security policy, and code-of-conduct/contributing docs. As a Microsoft-maintained project with active development and broad CI coverage across operating systems, it exhibits mature engineering practices.

API Design - Two ergonomic surfaces are offered: a zero-config CLI (python -m debugpy --listen ... script.py) for editor and remote use, and a tiny Python API (debugpy.listen(), debugpy.wait_for_client(), debugpy.breakpoint()) for enabling attach debugging from inside an application. Because it implements the standard DAP, editor integration requires no debugpy-specific client code.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search