We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90e0a81 commit e44a670Copy full SHA for e44a670
Lib/pdb.py
@@ -2706,6 +2706,7 @@ def do_commands(self, arg):
2706
]
2707
# fmt: on
2708
2709
+ end_cmds += ["end"] # pseudo-command
2710
self._send(commands_entry={"bpnum": bnum, "terminators": end_cmds})
2711
return
2712
@@ -2875,8 +2876,10 @@ def prompt_for_breakpoint_command_list(self, prompt):
2875
2876
cmd = self.pdb_instance.parseline(line)[0]
2877
if cmd in self.command_list_terminators:
2878
break
- except EOFError:
2879
- return
+ except (KeyboardInterrupt, EOFError):
2880
+ print(flush=True)
2881
+ print("command definition aborted, old commands restored")
2882
+ break
2883
finally:
2884
self.commands_mode = False
2885
0 commit comments