ChatGDB  by pgosar

CLI tool for debugging with natural language via LLM

created 2 years ago
922 stars

Top 40.4% on sourcepulse

GitHubView on GitHub
Project Summary

ChatGDB integrates ChatGPT into GDB and LLDB debuggers, enabling users to interact with the debugger using natural language. This tool aims to accelerate debugging workflows for developers working with compiled languages by translating natural language requests into debugger commands and providing explanations for executed commands or general queries.

How It Works

ChatGDB acts as a bridge between the user's natural language input and the GDB/LLDB command-line interface. It leverages OpenAI's API to process user queries, generate appropriate debugger commands, and optionally provide explanations. The integration is achieved by sourcing Python scripts into the respective debugger's initialization files (.gdbinit or .lldbinit), allowing commands like chat <query> and explain [query] to be executed directly within the debugging session.

Quick Start & Requirements

  • Install via pip: pip3 install chatgdb
  • Requires Python 3.3+
  • OpenAI API Key required.
  • Configuration: chatgdb -k <API KEY>, chatgdb -m <MODEL> (gpt-3.5-turbo or gpt-4), chatgdb -u <api-url>
  • GDB integration: echo "source $(python -m site --user-site)/chatgdb/gdb.py" > $HOME/.gdbinit
  • LLDB integration: echo "command script import $(python -m site --user-site)/chatgdb/lldb.py" > $HOME/.lldbinit
  • Official documentation: Not explicitly linked, but installation and usage are detailed in the README.

Highlighted Details

  • Natural language interface for GDB/LLDB commands.
  • Ability to explain executed commands or answer general debugging questions.
  • Supports both GDB and LLDB debuggers.
  • Configurable to use different OpenAI models (GPT-3.5 Turbo, GPT-4) and API endpoints.

Maintenance & Community

  • Project is actively developed with future features like context-awareness planned.
  • Updates can be installed via pip3 install chatgdb --upgrade.
  • Community engagement is encouraged via CONTRIBUTING.md and project updates shared on Twitter.

Licensing & Compatibility

  • The README does not explicitly state a license.

Limitations & Caveats

  • Requires an active OpenAI API key, incurring potential costs.
  • Configuration details are stored in plain text within the Python site-packages directory.
  • The effectiveness of natural language interpretation is dependent on the underlying LLM's capabilities.
Health Check
Last commit

7 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
15 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.