-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
gh-127321: Avoid stopping at an opcode without an associated line number for breakpoint() #127457
Conversation
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.
Nice solution.
Ah, @iritkatriel do you think we should backport this to 3.13? It's a bit of behavior change but only happens in rare cases. If not, we should protect all the access to |
I think this is a bug fix, so yes. |
Thanks @gaogaotiantian for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, @gaogaotiantian, I could not cleanly backport this to
|
…ated line number for breakpoint() (pythonGH-127457) (cherry picked from commit 1bc4f07) Co-authored-by: Tian Gao <[email protected]>
GH-127487 is a backport of this pull request to the 3.13 branch. |
GH-127487 is a backport of this pull request to the 3.13 branch. |
…ne number for breakpoint() (python#127457)
If we are tracing opcodes (which only happen when we do
set_trace()
for now), we just step instr again if there's no line number.f_trace_opcodes
toTrue
can lead tof_lineno
being removed in some cases (usingbreakpoint()
/pdb.set_trace()
) #127321