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.

nice things

Some extra features to note:

  • 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.
  • If claude_here detects that webbrowser will use a text-based browser by default, it will instead print an OSC-8-compliant hyperlink to the terminal for you to open using a graphical browser. This is especially useful if you are debugging a remote machine.

breakpoint

breakpoint additionally supports some optional arguments:

  • base_debugger determines the debugger to call in addition to launching Claude. Defaults to pdb.set_trace.
  • 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_VERBOSITY can be set to a positive integer that will determine how much information to send to Claude; the larger the value the more info is sent to Claude. Defaults to 10.

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

Uploaded Source

Built Distribution

claude_here-0.2.1-py3-none-any.whl (51.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: claude_here-0.2.1.tar.gz
  • Upload date:
  • Size: 43.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.2.1.tar.gz
Algorithm Hash digest
SHA256 397425901762312ccf1f69a3ff9c8d708151f7a479bcedf2078653cac7b53bd4
MD5 b8060b99ab3ee01e1c5681a3ca3d5b89
BLAKE2b-256 2de0a07d311cbd7f821313d6523d8330e26702ffd3a77dcf0ac277996fac407a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: claude_here-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 51.8 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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1f64b4497c283bfdc891b2e0f8f5ea6c1f6cbe64fb8ba953552f578bddb35b68
MD5 8751fb3ff3765c59ef3423b3f95ae1fc
BLAKE2b-256 55b8e724be3135caf213baf866e59c5737a7bc150c896677200154d4e56033e4

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