debugpy
Microsoft's Debug Adapter Protocol debugger for Python used by VS Code
Repository Health
Technical Analysis
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.
Used by 2 apps in this directory
argilla
AI Development · Data Engineering
Collaborate on high-quality AI training data with a self-hosted annotation platform built for LLMs, NLP, and multimodal models.
Redash
Analytics · Data Engineering
Redash lets anyone connect to 35+ SQL and NoSQL data sources, write a query in the browser, and turn the result into a shared dashboard — no separate BI suite required.