MCPcopy Index your code
hub / github.com/python/cpython / do_quit

Method do_quit

Lib/pdb.py:2031–2054  ·  view source on GitHub ↗

q(uit) | exit Quit from the debugger. The program being executed is aborted.

(self, arg)

Source from the content-addressed store, hash-verified

2029 complete_debug = _complete_expression
2030
2031 def do_quit(self, arg):
2032 """q(uit) | exit
2033
2034 Quit from the debugger. The program being executed is aborted.
2035 """
2036 # Show prompt to kill process when in 'inline' mode and if pdb was not
2037 # started from an interactive console. The attribute sys.ps1 is only
2038 # defined if the interpreter is in interactive mode.
2039 if self.mode == 'inline' and not hasattr(sys, 'ps1'):
2040 while True:
2041 try:
2042 reply = input('Quitting pdb will kill the process. Quit anyway? [y/n] ')
2043 reply = reply.lower().strip()
2044 except EOFError:
2045 reply = 'y'
2046 self.message('')
2047 if reply == 'y' or reply == '':
2048 sys.exit(1)
2049 elif reply.lower() == 'n':
2050 return
2051
2052 self._user_requested_quit = True
2053 self.set_quit()
2054 return 1
2055
2056 do_q = do_quit
2057 do_exit = do_quit

Callers 1

do_EOFMethod · 0.95

Calls 6

messageMethod · 0.95
inputFunction · 0.85
stripMethod · 0.45
lowerMethod · 0.45
exitMethod · 0.45
set_quitMethod · 0.45

Tested by

no test coverage detected