Skip to content

Conversation

gaogaotiantian
Copy link
Member

@gaogaotiantian gaogaotiantian commented Sep 23, 2024

Cleaned up the code for commands command so breakpoint commands will go through the normal parsing and executing path.

Also a bug (#68328) is fixed for until in commands. A small behavior of silent is changed which matches the current behavior of .pdbrc (no interaction, no frame info).

@iritkatriel sorry there are too many PRs, blame the sprint!


📚 Documentation preview 📚: https://cpython-previews--124401.org.readthedocs.build/

Comment on lines 433 to 440
If you have a command that resumes execution in the command list, the normal
frame information before you interact with pdb is not displayed. If none of
the other commands print anything, you see no sign that the breakpoint was
reached.

If you don't have a command that resumes execution in the command list, you
can also use the ``silent`` command anywhere in the command list to suppress
the frame information.
Copy link
Member

Choose a reason for hiding this comment

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

Can we make this more concise? Is this new version correct?

Suggested change
If you have a command that resumes execution in the command list, the normal
frame information before you interact with pdb is not displayed. If none of
the other commands print anything, you see no sign that the breakpoint was
reached.
If you don't have a command that resumes execution in the command list, you
can also use the ``silent`` command anywhere in the command list to suppress
the frame information.
If the command list contains the ``silent`` command, or a command that
resumes execution, then the breakpoint message containing information about
the frame in which you last interacted with pdb is not displayed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I found "in which you last interacted with pdb" is a bit confusing to me. I do think it's better to put the two cases together, but maybe just say the information about the frame is not displayed? When I say "before you interact with pdb", I wanted to make it clear about what frame information. Maybe it's not needed?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure 'before you interacted with on is clear' because the commands also interact with pdb.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I'm not saying my version is better. I'm thinking it might be enough for the users to just say information about the frame?

If the command list contains the silent command, or a command that
resumes execution, then the breakpoint message containing information about
the frame is not displayed.

Co-authored-by: Irit Katriel <[email protected]>
@gaogaotiantian gaogaotiantian merged commit b577460 into python:main Sep 29, 2024
34 checks passed
@gaogaotiantian gaogaotiantian deleted the refactor-commands branch September 29, 2024 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants