-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-41607: Print clickable path to breakpoint in pdb #22964
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
bpo-41607: Print clickable path to breakpoint in pdb #22964
Conversation
The pdb module prints path to breakpoint in a rather unique way:
--Return--
> /home/artur/code/test.py(3)<lambda>()->None
-> asd = lambda: pdb.set_trace()
(Pdb) locals()
This patch changes it to print it similarly to traceback:
--Return--
File "/home/artur/code/test.py", line 3, in <lambda>
-> asd = lambda: pdb.set_trace()
(Pdb) locals()
thus making the line clickable in many popular code editors.
1265977 to
dfcb04c
Compare
|
This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
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.
I see failures on all platforms, can you check why this is and fix, please?
| @@ -543,7 +543,7 @@ def format_stack_entry(self, frame_lineno, lprefix=': '): | |||
| import linecache, reprlib | |||
| frame, lineno = frame_lineno | |||
| filename = self.canonic(frame.f_code.co_filename) | |||
| s = '%s(%r)' % (filename, lineno) | |||
| s = 'File "%s", line %r, in ' % (filename, lineno) | |||
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.
Is this covered by any tests?
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
|
The issues is closed with a reason. I'll close the PR as well. Please comment on the issue if you disagree. |
Issue: https://bugs.python.org/issue41607
The pdb module prints path to breakpoint in a rather unique way:
This patch changes it to print it similarly to traceback:
thus making the line clickable in many popular code editors.
https://bugs.python.org/issue41607