Wrap cmdloop() such that KeyboardInterrupt stops the debugger.
(self)
| 780 | """Version of debugger where KeyboardInterrupt exits the debugger altogether.""" |
| 781 | |
| 782 | def cmdloop(self): |
| 783 | """Wrap cmdloop() such that KeyboardInterrupt stops the debugger.""" |
| 784 | try: |
| 785 | return OldPdb.cmdloop(self) |
| 786 | except KeyboardInterrupt: |
| 787 | self.stop_here = lambda frame: False |
| 788 | self.do_quit("") |
| 789 | sys.settrace(None) |
| 790 | self.quitting = False |
| 791 | raise |
| 792 | |
| 793 | def _cmdloop(self): |
| 794 | while True: |