Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Description
Feature or enhancement
I believe it would be useful to allow to move between chained exception in Pdb.
That is to say if you have
try: function_that_raises()except Exception as e: raise ... from e # Pdb says this is the bottom frame.
Havin something likedown
go down the chained exception ? This was requested onIPython's ipdb, But I believe this could be brought to Pdb as well.
Picth
When moving up and down the stack in Pdb in chained exception, when hitting the bottom of the stack, it should be possible to look at the__cause__
or__context__
and jump to the top of it. And vice-versa when going up if we store the various TB we went through.
In post-mortem debugging this should allow to better understand the reason for an exception.
Previous discussion
See,
https://discuss.python.org/t/interested-in-support-to-jump-between-chained-exception-in-pdb/29470/3
Linked PRs
- gh-106670: Allow Pdb to move between chained exceptions #106676
- gh-106670: Fix Pdb handling of chained Exceptions with no stacks. #108865
- gh-106670: Set convenience variable for post mortem debugging #110493
- gh-106670: Fix a typo in pdb's exceptions command #132277
- [3.13] gh-106670: Fix a typo in doc of pdb's exceptions command (GH-132277) #132279