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.

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:

  • 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 execution.
  • just_gather_info=True will gather information to send to Claude later (on an uncaught exception or breakpoint without just_gather_info=True) without actually launching Claude or the base_debugger.

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.1.tar.gz (43.0 kB view details)

Uploaded Source

Built Distribution

claude_here-0.1.1-py3-none-any.whl (50.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: claude_here-0.1.1.tar.gz
  • Upload date:
  • Size: 43.0 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.1.tar.gz
Algorithm Hash digest
SHA256 b997032cb7103e83b28dfb777d2b99ae5278586c25079868d9f0f3b1b2c40f48
MD5 2ccde8b5d778e33a988e52d943db1745
BLAKE2b-256 711a38abb691839295da4cadb8f8e717963c42216715731851923d77174d5e52

See more details on using hashes here.

File details

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

File metadata

  • Download URL: claude_here-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 50.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff3ad014842399a90c759fe46f97e23321cd59a714d14a9767278f59e912d098
MD5 32c172a25afc2aa875f7b7f34f2dd421
BLAKE2b-256 2015ec7716ddb4c10c88b96907c74881fd8ac3412dabd545c13898a454af1f99

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