Skip to content

daninfpj/ai-pdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ai-pdb

The Python Debugger (PDb) augmented with AI.

Description

ai-pdb is an enhanced version of the Python Debugger (PDb) that integrates AI capabilities to assist with debugging tasks. This tool leverages the power of Claude to provide more insightful debugging information and suggestions.

Use Claude directly from your debugging environment to avoid copying and pasting back and forth.

ai-pdb

Features

  • AI-assisted debugging prompts
  • Enhanced context-aware debugging
  • Integration with the Anthropic API for AI responses

Installation

Install using pip:

pip install ai-pdb

Usage

You should have ANTHROPIC_API_KEY available in your ENV to be able to use this tool.

To use ai-pdb, simply import it in your Python script and start the debugger as you normally would:

from ai_pdb import AIPdb

debugger = AIPdB()

debugger.set_trace()

Once you’re in a debugging session, you can use the ai command to assist you with debugging.

There are three sub-commands available:

debug

ai
ai debug

This is the default and is equivalent you just invoking ai from the debugging shell.

This will provide Claude with your current execution context and it will help you understand what’s going on, help you fix errors, etc.

docs

ai docs

This will provide documentation relevant to the execution context.

query

ai query <custom query>

You can ask Claude anything. Your question is automatically enriched with the execution context, providing all necessary information.

Demo

ai-pdb

About

The Python Debugger (PDb) augmented with AI.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages