Skip to content

debugger: load 'ipdb' if present#2342

Merged
simonw merged 3 commits intosimonw:mainfrom
myhro:enhancement/debugger-load-ipdb
Aug 21, 2024
Merged

debugger: load 'ipdb' if present#2342
simonw merged 3 commits intosimonw:mainfrom
myhro:enhancement/debugger-load-ipdb

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
@codecov
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