AI-assisted debugging tool for C/C++/Python/Rust code
Top 37.7% on sourcepulse
ChatDBG is an AI-powered debugging assistant that integrates large language models with standard debuggers (pdb, lldb, gdb) for C/C++, Python, and Rust. It allows users to ask natural language questions about program behavior, receive error diagnoses, and get suggested code fixes, aiming to automate root cause analysis.
How It Works
ChatDBG leverages LLMs to interpret debugger states and user queries. When a program crashes or encounters an issue, users can interact with the debugger using commands like why
to ask for explanations. ChatDBG then uses the LLM to analyze the current execution context, stack trace, and variable values to provide insights and potential solutions, effectively turning the debugger into a conversational tool.
Quick Start & Requirements
python3 -m pip install chatdbg
OPENAI_API_KEY
environment variable.lldb
or gdb
via ~/.lldbinit
or ~/.gdbinit
.chatdbg = "0.6.2"
to Cargo.toml
and use the #[chatdbg::main]
attribute.Highlighted Details
pdb
, and native debuggers lldb
and gdb
.Maintenance & Community
The project is authored by Emery Berger, Stephen Freund, Kyla Levin, and Nicolas van Kempen. A paper detailing technical aspects is forthcoming at FSE 2025.
Licensing & Compatibility
The README does not explicitly state the license. Compatibility for commercial use or closed-source linking is not specified.
Limitations & Caveats
ChatDBG currently requires an OpenAI API key and relies on GPT-4, incurring costs. Integration with lldb
may require updating to newer LLVM versions. The project is actively backporting features across different debugger integrations.
3 weeks ago
1 day