-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
ipdb: support for chained exceptions #13982
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
Comments
Apologies for the late reply to this issue. After a bit of investigating it should be possible with some refactor; I believe in both case. One limitation is that pdb get a Traceback by default instead of a full Exception and you can go from Exception to TB but not the other way around. I can mess around with the internal state of pdb when you do |
Discussion upstream before opening an issue https://discuss.python.org/t/interested-in-support-to-jump-between-chained-exception-in-pdb/29470 |
See discussion in python/cpython#106670 as well. |
Closes ipython#13982 This is a "backport" of python/cpython#106676 See documentation there
This is now in CPython main branch and will part of Python 3.13 if all is well, |
Closes ipython#13982 This is a "backport" of python/cpython#106676 See documentation there
Closes #13982 This is a "backport" of python/cpython#106676 See documentation there
This is a common pattern to enrich an exception with more information:
This is common when a second exception occurs during exception handling:
In both cases, ipdb (and pdb) wont let us step up the stack from to find the error in
bar
. While python 3.11 has Exception.add_note, there will continue to be lots of code using the methods above (and its not always practical to use this).Example:

Can we enhance ipdb to handle both cases?
The text was updated successfully, but these errors were encountered: