Skip to content

Fix set_trace(paused=False) #688

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions pudb/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,24 +262,22 @@
# See pudb issue #52. If this works well enough we should upstream to
# stdlib bdb.py.
# self.reset()

if paused:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI the only change here is removing this line (this is clearer if you look at https://github.com/inducer/pudb/pull/688/files?w=1)

self.enterframe = frame

Check failure on line 265 in pudb/debugger.py

View workflow job for this annotation

GitHub Actions / basedpyright

Instance variable "enterframe" is not initialized in the class body or __init__ method (reportUninitializedInstanceVariable)

Check warning on line 265 in pudb/debugger.py

View workflow job for this annotation

GitHub Actions / basedpyright

Type annotation for attribute `enterframe` is required because this class is not decorated with `@final` (reportUnannotatedClassAttribute)

Check warning on line 265 in pudb/debugger.py

View workflow job for this annotation

GitHub Actions / basedpyright

Type of "enterframe" is partially unknown   Type of "enterframe" is "FrameType | Unknown" (reportUnknownMemberType)

thisframe = frame

Check warning on line 267 in pudb/debugger.py

View workflow job for this annotation

GitHub Actions / basedpyright

Type of "thisframe" is partially unknown   Type of "thisframe" is "FrameType | Unknown" (reportUnknownVariableType)
while thisframe:
thisframe.f_trace = self.trace_dispatch
self.botframe = thisframe

Check warning on line 270 in pudb/debugger.py

View workflow job for this annotation

GitHub Actions / basedpyright

Type annotation for attribute `botframe` is required because this class is not decorated with `@final` (reportUnannotatedClassAttribute)
if sys.version_info >= (3, 13):
# save trace flags, to be restored by set_continue
self.frame_trace_lines_opcodes[thisframe] = ( # pylint: disable=no-member

Check warning on line 273 in pudb/debugger.py

View workflow job for this annotation

GitHub Actions / basedpyright

Code is unreachable (reportUnreachable)
thisframe.f_trace_lines,
thisframe.f_trace_opcodes)

# We need f_trace_lines == True for the debugger to work
thisframe.f_trace_lines = True

thisframe = thisframe.f_back

Check warning on line 280 in pudb/debugger.py

View workflow job for this annotation

GitHub Actions / basedpyright

Type of "f_back" is partially unknown   Type of "f_back" is "FrameType | Unknown | None" (reportUnknownMemberType)

frame_info = (self.canonic(frame.f_code.co_filename), frame.f_lineno)
if frame_info not in self.set_traces or self.set_traces[frame_info]:
Expand Down
Loading