Interactive debugging framework for Python code
Top 99.1% on SourcePulse
debug-gym is a Python framework for interactive debugging of codebases, targeting researchers and developers seeking to automate or augment the debugging process using Large Language Models (LLMs). It provides a text-based, Gymnasium-compatible environment that allows LLM agents to interact with code using tools like debuggers and code editors, aiming to identify and fix bugs automatically.
How It Works
The core of debug-gym is RepoEnv
, a simulation environment that exposes a set of tools to LLM agents. These tools, such as listdir
, view
, eval
, pdb
, and rewrite
, augment the agent's capabilities. Agents interact by taking observations and generating tool commands. The environment executes these commands, providing new observations, facilitating an iterative debugging loop. This modular tool design allows for extensibility and customization for various debugging scenarios.
Quick Start & Requirements
pip install debug-gym
llm.yaml
.pdb
) are primarily supported on Linux due to PTY limitations on macOS/Windows.Highlighted Details
Maintenance & Community
This project is from Microsoft. Contributions are welcome via a CLA. Further details on contributing and the Code of Conduct are available.
Licensing & Compatibility
The repository does not explicitly state a license in the README. Compatibility for commercial use or closed-source linking is not specified.
Limitations & Caveats
Interactive terminal debugging (e.g., pdb
) has limited support on non-Linux platforms (macOS, Windows). The solution_agent
is currently benchmark-specific.
1 day ago
Inactive