debugpy: An Advanced Debugger for Python Development

This repository profile is provided by osrepos.com, an open source repository discovery platform.

debugpy: An Advanced Debugger for Python Development

Summary

debugpy is Microsoft's robust implementation of the Debug Adapter Protocol (DAP) for Python 3. It provides powerful debugging capabilities, allowing developers to efficiently inspect and troubleshoot their Python applications. This tool supports both command-line and API-based usage, offering flexibility for various development workflows.

Repository Information

Analyzed by OSRepos on October 11, 2025

Topics

Click on any tag to explore related repositories

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Introduction

debugpy is a comprehensive debugger for Python 3, developed by Microsoft. It implements the Debug Adapter Protocol (DAP), enabling seamless integration with various IDEs and editors that support DAP, such as Visual Studio Code. debugpy is designed to provide a rich debugging experience, allowing you to step through code, inspect variables, set breakpoints, and much more, whether you are debugging local scripts, modules, or attaching to running processes.

Installation

debugpy can be easily installed using pip, the Python package installer.

pip install debugpy

Examples

CLI Usage

debugpy offers a flexible command-line interface for debugging.

Debugging a script file:
To run a script with debugging enabled, listening on localhost:5678:

python -m debugpy --listen localhost:5678 myfile.py

To wait for a client to attach before execution:

python -m debugpy --listen localhost:5678 --wait-for-client myfile.py

Debugging a module:
You can debug a Python module using the -m switch:

python -m debugpy --listen localhost:5678 -m mymodule

Attaching to a running process:
Inject the debugger into an already running Python process by its PID:

python -m debugpy --listen localhost:5678 --pid 12345

API Usage

For more programmatic control, debugpy provides a Python API.

Enabling debugging:
Import debugpy and call debugpy.listen() at the beginning of your script:

import debugpy
debugpy.listen(("localhost", 5678))
# Your application code

Waiting for the client:
To pause execution until a debugger client connects:

import debugpy
debugpy.listen(5678)
debugpy.wait_for_client()  # Blocks execution until client is attached
# Your application code

Programmatic breakpoints:
Use breakpoint() or debugpy.breakpoint() to set a breakpoint programmatically. Execution will pause if a client is attached.

import debugpy
debugpy.listen(...)

while True:
    # ...
    breakpoint()  # or debugpy.breakpoint()
    # ...

Why Use debugpy?

debugpy stands out as a powerful debugging tool for several reasons:

  • DAP Compliance: Its adherence to the Debug Adapter Protocol ensures broad compatibility with modern development environments.
  • Flexibility: It supports both command-line and API-driven debugging, catering to different integration needs and workflows.
  • Comprehensive Features: From basic step-through debugging to attaching to running processes and handling subprocesses, debugpy covers a wide range of debugging scenarios.
  • Microsoft Backing: Developed by Microsoft, it benefits from continuous development and integration, especially within tools like Visual Studio Code.

Links

Related repositories

Similar repositories that may be relevant next.

LangTest: A Comprehensive Library for Safe & Effective Language Models

LangTest: A Comprehensive Library for Safe & Effective Language Models

June 30, 2026

LangTest is an open-source Python library dedicated to ensuring the safety and effectiveness of language models. It offers a comprehensive framework for testing model quality, covering robustness, bias, fairness, and accuracy across various NLP tasks and LLM providers. With LangTest, developers can generate and execute over 60 distinct test types with just one line of code, promoting responsible AI development.

ai-safetyai-testinglarge-language-models
EvalPlus: Rigorous Evaluation for LLM-Synthesized Code

EvalPlus: Rigorous Evaluation for LLM-Synthesized Code

June 30, 2026

EvalPlus is a robust framework designed for the rigorous evaluation of code generated by Large Language Models (LLMs). It extends standard benchmarks like HumanEval and MBPP with significantly more tests, offering precise assessment of code correctness and efficiency. This tool is crucial for developers and researchers aiming to thoroughly validate LLM-synthesized code.

benchmarklarge-language-modelsprogram-synthesis
AgentEvals: Robust Evaluation Tools for LLM Agent Trajectories

AgentEvals: Robust Evaluation Tools for LLM Agent Trajectories

June 30, 2026

AgentEvals is a powerful open-source package from LangChain designed to simplify the evaluation of agentic applications. It provides a collection of ready-made evaluators and utilities, with a particular focus on analyzing agent trajectories, the intermediate steps an agent takes to solve problems. This helps developers understand and improve the reliability and performance of their LLM agents.

PythonLLMAgents
Phoenix: AI Observability and Evaluation Platform for LLMs

Phoenix: AI Observability and Evaluation Platform for LLMs

June 28, 2026

Phoenix is an open-source AI observability platform from Arize AI, designed for comprehensive experimentation, evaluation, and troubleshooting of LLM applications. It provides robust features including OpenTelemetry-based tracing, LLM evaluation, and systematic prompt management. This platform helps developers optimize and debug their AI models effectively across various environments.

AI ObservabilityLLM EvaluationPrompt Engineering

Source repository

Open the original repository on GitHub.

7 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️