Skip to content

Pdb can't use the commands through -c or .pdbrc files #90095

Closed

Description

@Zrincet
mannequin
BPO 45937
Nosy @Zrincet

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2021-11-30.03:36:50.577>
labels = ['3.8', 'library']
title = "Pdb can't use the commands through -c or .pdbrc files"
updated_at = <Date 2021-11-30.03:36:50.577>
user = 'https://github.com/Zrincet'

bugs.python.org fields:

activity = <Date 2021-11-30.03:36:50.577>
actor = 'Zrincet'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2021-11-30.03:36:50.577>
creator = 'Zrincet'
dependencies = []
files = []
hgrepos = []
issue_num = 45937
keywords = []
message_count = 1.0
messages = ['407350']
nosy_count = 1.0
nosy_names = ['Zrincet']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue45937'
versions = ['Python 3.8']

Linked PRs

Activity

  1. Zrincet commented on Nov 30, 2021

    Zrincetmannequin
    MannequinAuthor

    I have a python file:

    def do_something():
        pass
    
    def main():
        a = 1
        b = 2
        c = a+b
        print(f"c:{c}")
        pass
    
    if __name__ == '__main__':
        main()

    I run this command:

    python -m pdb -c "b 5" -c "commands 1;;do_something();;end" -c "c" main.py

    It doesn't work.
    And I have a .pdbrc file

    b 5
    commands 1
    do_something()
    end
    c

    It doesn't work either.

  2. ghost added on Nov 30, 2021
  3. ghost added on Nov 30, 2021
  4. ghost added
    stdlibStandard Library Python modules in the Lib/ directory
    on Nov 30, 2021
  5. ghost added
    stdlibStandard Library Python modules in the Lib/ directory
    on Nov 30, 2021
  6. ghost transferred this issue fromon Apr 10, 2022
  7. Delengowski commented on Mar 3, 2023

    @Delengowski
    Contributor

    Would I be able to get some clarification if this is even supposed to be possible? I myself had a desire to do this and have performed the necessary setup to make an attempt at making this possible but given the long standing stack overflow post about this, I'm not sure if this is even a bug or not.

    https://stackoverflow.com/questions/2013698/commands-for-breakpoints-in-a-pdbrc-file

  8. ghost added a commit that references this issue on Mar 11, 2024
  9. gaogaotiantian commented on Mar 11, 2024

    @gaogaotiantian
    Member

    This is fixed now, you can define any commands/aliases in .pdbrc as you want.

  10. ghost closed this as completedon Mar 11, 2024
  11. Zrincet commented on Mar 12, 2024

    @Zrincet
    Author

    This is fixed now, you can define any commands/aliases in .pdbrc as you want.

    Just wanted to drop a quick thank you for fixing this bug that's been lurking around for ages. Huge relief to see it finally squashed!

  12. ghost added a commit that references this issue on Mar 12, 2024
  13. ghost added a commit that references this issue on Mar 12, 2024
  14. ghost added a commit that references this issue on Mar 12, 2024
  15. ghost added a commit that references this issue on Mar 12, 2024
  16. 15 remaining items

  17. gaogaotiantian commented on Mar 14, 2024

    @gaogaotiantian
    Member

    Okay I'll do a PR to keep the consistency of the behavior and update the docs (in a way that can be applied to 3.12 and 3.11 as well because no behavior is changed).

  18. ghost added a commit that references this issue on Mar 15, 2024
  19. ghost added a commit that references this issue on Mar 15, 2024
  20. ghost added a commit that references this issue on Mar 15, 2024
  21. ghost added a commit that references this issue on Mar 15, 2024
  22. ghost added a commit that references this issue on Mar 15, 2024
  23. gaogaotiantian commented on Mar 15, 2024

    @gaogaotiantian
    Member

    Okay we restored the behavior for 3.12 and 3.11, and we also updated the docs to clarify the behavior of .pdbrc. I'll close this. Let us know if there are more stuff to do for the matter.

  24. ghost closed this as completedon Mar 15, 2024
  25. ghost moved this from Todo to Done in Release and Deferred blockers 🚫on Mar 15, 2024
  26. wbolster commented on Mar 15, 2024

    @wbolster
    Contributor

    wow, that was quick. thanks 🙏🏼

  27. ghost added a commit that references this issue on Mar 20, 2024
  28. ghost added a commit that references this issue on Mar 25, 2024
  29. ghost added a commit that references this issue on Mar 25, 2024
  30. ghost added a commit that references this issue on Apr 17, 2024
  31. ghost added a commit that references this issue on Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.11only security fixes3.12only security fixesrelease-blockerstdlibStandard Library Python modules in the Lib/ directory

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions