Skip to main content

debug Python with claude.ai

Project description

claude-here

debug Python with claude.ai

Usage

Just

pip install claude-here

then

import claude_here

and any uncaught exceptions will automatically launch a new conversation in claude.ai pre-filled with information for Claude to help you debug the error.

To debug something that isn't causing an exception, just add

breakpoint()

where you want to debug and it will automatically launch Claude with info about the current locals to help you debug.

Note that if a breakpoint is hit multiple times, or an uncaught exception is raised after hitting a breakpoint, the information sent to Claude will be cumulative.

breakpoint

breakpoint additionally supports some optional arguments:

  • just_gather_info=True will gather information to send to Claude later without actually launching Claude.
  • base_debugger determines the debugger to call in addition to launching Claude. Defaults to pdb.set_trace. Setting to None will set up a simple prompt to ask you when you're ready to continue exectuion.

Environment Variables

claude_here supports some additional configuration via environment variables:

  • CLAUDE_HERE_PROJECT_ID can be set to a Claude Projects UUID (https://claude.ai/project/<this-part-here-is-the-uuid>) to launch your debugging conversations in.
  • CLAUDE_HERE_MAX_CONTEXT_ITEMS can be set to an integer that will determine the maximum number of prior breakpoint contexts that will be included when launching Claude.

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

claude_here-0.1.0.tar.gz (42.6 kB view details)

Uploaded Source

Built Distribution

claude_here-0.1.0-py3-none-any.whl (49.7 kB view details)

Uploaded Python 3

File details

Details for the file claude_here-0.1.0.tar.gz.

File metadata

  • Download URL: claude_here-0.1.0.tar.gz
  • Upload date:
  • Size: 42.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for claude_here-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d74b1f79262d8ccf4e285be461b36e94c74c69572cb06c97f993be9fb8f087b6
MD5 a6c576a6b92fa8ac2cb60c9e58bb9b88
BLAKE2b-256 ac58a57793ed4ffd3f9f7e8279916203070cc9a503c2b994abad95f302fd244a

See more details on using hashes here.

File details

Details for the file claude_here-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: claude_here-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 49.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for claude_here-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 623e6cb1126a8a4e3c7105d6da4090fb327a79e413d57c3e150005ba7058ba44
MD5 beccb23b71d62fde2b97f60a1e2a8fb6
BLAKE2b-256 de43db6b9027749e413bd29375f1ec78c982b14908bae3460f8b2a9e18f078e2

See more details on using hashes here.

Supported by

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