Skip to content

Support to jump between chained exception in Pdb #106670

Closed
@Carreau

Description

@Carreau

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 like down go down the chained exception ? This was requested on IPython'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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions