Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Change inpdb behavior at exit from post-mortem debugger #118714

Closed
Labels
type-bugAn unexpected behavior, bug, or error
@chgnrdv

Description

@chgnrdv

Bug report

Bug description:

In 3.12 and earlier, if user entersquit/exit commands or does Ctrl-D,pdb restarts script with corresponding message and exits only on repeatedquit/exit/Ctrl-D:

$ python -m pdb -c c pdb_bug.py Traceback (most recent call last):  File "/usr/local/lib/python3.11/pdb.py", line 1775, in main    pdb._run(target)  File "/usr/local/lib/python3.11/pdb.py", line 1643, in _run    self.run(target.code)  File "/usr/local/lib/python3.11/bdb.py", line 600, in run    exec(cmd, globals, locals)  File "<string>", line 1, in <module>  File "/home/radislav/projects/cpython/pdb_bug.py", line 1, in <module>    raise ValueError()ValueErrorUncaught exception. Entering post mortem debuggingRunning 'cont' or 'step' will restart the program> /home/radislav/projects/cpython/pdb_bug.py(1)<module>()-> raise ValueError()(Pdb) quitPost mortem debugger finished. The /home/radislav/projects/cpython/pdb_bug.py will be restarted> /home/radislav/projects/cpython/pdb_bug.py(1)<module>()-> raise ValueError()(Pdb) quit$

Sincefa18b0a only message is printed, but Python exits completely:

$ ./python -m pdb -c c pdb_bug.py Traceback (most recent call last):  ...  File "/home/radislav/projects/cpython/pdb_bug.py", line 1, in <module>    raise ValueError()ValueErrorUncaught exception. Entering post mortem debuggingRunning 'cont' or 'step' will restart the program> /home/radislav/projects/cpython/pdb_bug.py(1)<module>()-> raise ValueError()(Pdb) quitPost mortem debugger finished. The /home/radislav/projects/cpython/pdb_bug.py will be restarted$

@gaogaotiantian, what's your opinion? Should we restore the old behavior or remove confusing message about "restart"? As I can see,pdb docs doesn't state explicitly whatquit/exit commands should do in post-mortem debugger.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp