Skip to content
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-120254: Add a commands argument to pdb.Pdb #120255

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

gaogaotiantian
Copy link
Member

@gaogaotiantian gaogaotiantian commented Jun 8, 2024

Comment on lines +214 to +215
The *commands* argument, if given, would be a list of commands to execute
when the debugger starts. It has similar effects to the :file:`.pdbrc` file.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The *commands* argument, if given, would be a list of commands to execute
when the debugger starts. It has similar effects to the :file:`.pdbrc` file.
The *commands* argument, if given, is a list of commands to execute
when the debugger starts. Those commands are executed after those
optionally provided by the :file:`.pdbrc` file.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you think two "those" is a little bit confusing here? How about These commands are executed after any commands optionally provided by the :file:.pdbrc file?

Choose a reason for hiding this comment

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

I agree the double "those" is confusing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oups, you're right! I'm sorry I didn't reply to your question 3 weeks ago btw, but yes your suggestion is way better!

@@ -0,0 +1 @@
Added ``commands`` argument to :class:`pdb.Pdb` which allows user to send debugger commands in the source file.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Added ``commands`` argument to :class:`pdb.Pdb` which allows user to send debugger commands in the source file.
Added ``commands`` argument to :class:`pdb.Pdb` which allows users to send debugger commands in the source file.

@@ -211,6 +211,9 @@ access further features, you have to do this yourself:
The *readrc* argument defaults to true and controls whether Pdb will load
.pdbrc files from the filesystem.

The *commands* argument, if given, would be a list of commands to execute
when the debugger starts. It has similar effects to the :file:`.pdbrc` file.
Copy link
Contributor

Choose a reason for hiding this comment

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

The phrase “similar effects” is kind of vague. I am not sure how to say it more precisely. Link to the .pdbrc documentation? Not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants