-
Notifications
You must be signed in to change notification settings - Fork 230
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
On exception pudb now jumps into the exception instead of showing it #562
Comments
The regressing change was introduced in #515 to address a duplication of stack content in post-mortem mode. A PR satisfying both goals would be welcome. |
I'd like to understand more why the regression was introduced in #515 because this is driving my crazy. On this example: import asyncio
import sys
import pudb
async def has_an_error():
print("This function has en error")
a = {}
b = a["b"] + 1
return b
async def main():
pudb.set_trace()
try:
n = await has_an_error()
except asyncio.CancelledError:
raise
print("n =", n)
if __name__ == "__main__":
sys.exit(asyncio.run(main())) If I execute However, if I start it as So my question is, is there a way that That's why I want to know when you enter into the post-mortem mode? Or could |
So could this be a solution? def get_shortened_stack(self, frame, tb):
if if tb is not None and self.post_mortem:
frame = None
... ? |
Describe the bug
When you set a breakpoint with
pudb.set_trace()
and pudb stops, you can press n to execute the next statement. In the past if you the statement raised and exception, pudb would tell you that an exception was raised and pressing e let you inspect the exception. Since the releasev2022.01.02
pudb
does not show the exception but instead jumps onto the function where the exception was raised.To Reproduce
Steps to reproduce the behavior:
pudb.set_trace()
Expected behavior
pudb should tell you that the function raised an exception, by pressing e you should be able to inspect the the exception
Additional context
While some some might consider thus a nice feature, it also has the huge drawback, that it takes out of the context you were debugging and you might not be able to jump back, specially on
asyncio
tasks where you end up on the aio-loop rather than on your initial breakpoint.I already asked this question on the discussions board and it was suggested that I do a
git-bisect
. I did that and 98ccafc was found as the commit that introduced the bug.Versions
v2022.01.02
on Python 3.10.4The text was updated successfully, but these errors were encountered: