Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Also allow 'q', and add comments
  • Loading branch information
ADThomas-astro committed Feb 7, 2025
commit 229e4193a633f3cfa6ae3bc38675e914ea52486f
6 changes: 5 additions & 1 deletion Lib/pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1734,11 +1734,15 @@ def do_quit(self, arg):
reply = 'e'
self.message('')

if reply == 'e' or reply == '':
if reply in ('e', 'q', ''):
# Will raise BdbQuit and allow returning to REPL
break
elif reply == 'k':
# Kill process. Allows user to break out of infinite loop
# or exit both pdb and REPL when interactive work finished.
sys.exit(0)
elif reply.lower() == 'c':
# Cancel and return to debugger
return

self._user_requested_quit = True
Expand Down