Is there any interest/plan for 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.
How
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.
I believe up/down are fairly natural commands to do so, but open to other ways.