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
pdb: store whole exception information in locals (via user_exception) #80844
Comments
Currently Pdb.user_exception does not store the traceback in "user_exception", but only passes it to def user_exception(self, frame, exc_info):
"""This function is called if an exception occurs,
but only if we are to stop at or just below this level."""
if self._wait_for_mainpyfile:
return
exc_type, exc_value, exc_traceback = exc_info
frame.f_locals['__exception__'] = exc_type, exc_value
…
self.interaction(frame, exc_traceback) I think it would be useful to have the whole exception info at hand in the debugger (via the frame locals) directly. If backward compatible is important it should use a new name for this maybe ( Currenly pdb extensions (e.g. pdbpp) can get it either by going up in the stack, or grabbing it via Code ref: Lines 295 to 301 in e8113f5
|
Isn't it enough that the traceback is available on exc_value.__traceback__? |
As mentioned above, I think this is redundant because the traceback is on exc_value.__traceback__. Closing as there was not reply to my question, but correct me if I misunderstood the issue. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: