Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debugger: load 'ipdb' if present #2342

Merged
merged 3 commits into from
Aug 21, 2024

Conversation

myhro
Copy link
Contributor

@myhro myhro commented May 6, 2024

Transparently chooses between the IPython-enhanced ipdb or the standard pdb.

To me, personally, the tab-completion alone is already a killer-feature when debugging locals() variables.

What do you think of adding this option?


📚 Documentation preview 📚: https://datasette--2342.org.readthedocs.build/en/2342/

myhro and others added 2 commits May 6, 2024 11:37
Transparently chooses between the IPython-enhanced 'ipdb' or the
standard 'pdb'.
@simonw
Copy link
Owner

simonw commented Aug 21, 2024

I tested this like so:

datasette install ipdb

Then:

datasette --pdb --get /44

Output:

> /Users/simon/Dropbox/Development/datasette/datasette/app.py(1626)resolve_database()
   1625         except KeyError:
-> 1626             raise DatabaseNotFound(database_route)
   1627 

ipdb> c
<!DOCTYPE html>
<html lang="en">

@simonw
Copy link
Owner

simonw commented Aug 21, 2024

This is great, thanks very much!

@simonw simonw merged commit 1f3fb5f into simonw:main Aug 21, 2024
19 checks passed
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.58%. Comparing base (39dfc7d) to head (7896c50).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2342    /-   ##
=======================================
  Coverage   92.57%   92.58%           
=======================================
  Files          41       41           
  Lines        6401     6404     3     
=======================================
  Hits         5926     5929     3     
  Misses        475      475           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

simonw added a commit that referenced this pull request Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants