Skip to main content

The Python Debugger (PDb) augmented with AI.

Project description

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.

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.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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_pdb-0.1.1.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_pdb-0.1.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file ai_pdb-0.1.1.tar.gz.

File metadata

  • Download URL: ai_pdb-0.1.1.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.5.0

File hashes

Hashes for ai_pdb-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a7254035d82aee6a3cd001a2167d197ece401cc20c529ff7a5b296e92ad7ba66
MD5 078d59dc4b479b5d236c022875b18cc7
BLAKE2b-256 53511023bf7d5d6b84b27121e5ac5acfe91f1a92f11f990865ce40eba4e59fab

See more details on using hashes here.

File details

Details for the file ai_pdb-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ai_pdb-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.5.0

File hashes

Hashes for ai_pdb-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 21f035c66387375d2ecf18abb1fa08d836bbf658147c0a32b8b2c02bba672c7a
MD5 ee2d8bd6780819878438b9810bb34122
BLAKE2b-256 a736e28c3d9d4b7f9b42fe569ee781ba5116c978bee86da27e9f229b2e5f3481

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page