-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-111744: Make breakpoint()
enter the debugger immediately
#118579
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
Conversation
Haha. Away from my computer now, but I’ll take a look at this today. |
Pun is actually not intended. Took me a second to realize what's funny :) |
This is a breaking change but I can't tell you how many times I wanted to look at the state of a function, I put So this is great to see! |
Test changes look good. Thanks for applying a variety of fixes there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! I'll leave it open for a bit in case others have thoughts.
We had some discussion in #111744 and in discord channel. We know this is a breaking change but people agree it's much more intuitive.
This basically changes the
breakpoint()
andpdb.set_trace()
behavior so it stops immediately after the call, rather than before the next line.Unfortunately a lot of the test cases need to be adapted.
breakpoint
does not enter pdb until the "next event" happens #111744📚 Documentation preview 📚: https://cpython-previews--118579.org.readthedocs.build/