simonw / simonw/llm

--pdb option for the CLI

Open
#326 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

developer-experience enhancement
Dominant language
Python
Stars
12.5k
Forks
998
Avg merge
3d 13h
Merged PRs (30d)
10

Description

This would be useful for development:

@@ -280,6 +280,9 @@ def prompt(
         else:
             print(response.text())
     except Exception as ex:
+        import pdb
+
+        pdb.post_mortem()
         raise click.ClickException(str(ex))

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the prompt() exception handler shown in the issue and trace the CLI option definitions to see where --pdb belongs. Make the post-mortem behavior conditional on that option while preserving the existing error handling when it is absent; add or update CLI tests to verify both paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.