You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2014-01-15.09:28:52.923>labels= ['type-bug', 'library']
title='Inconsistent behavior in pdb when pressing Ctrl-C'updated_at=<Date2014-05-24.13:33:50.346>user='https://github.com/xdegaye'
With this script:
# START
def foo():
while 1:
pass
importpdb; pdb.set_trace()
foo()
# END
The following sequence of pdb commands aborts the script with a KeyboardInterrupt exception:
next
Ctrl-C
continue
While the equivalent following sequence of commands allows the debugging session to continue as
expected:
continue
Ctrl-C
continue
The first sequence of commands should behave as the second one.
A related problem is that the original SIGINT handler (named _previous_sigint_handler in the code)
is not restored when the program being debugged is stopped at a breakpoint that has been reached
after 'continue'. _previous_sigint_handler is lost forever in this case when the user hits
'continue' after stopping at that breakpoint, which is quite common. This is annoying. For example,
trying to extend pdb with a 'detach' command that enables the debuggee to run freely after the
debugging session is terminated: the program cannot be killed anymore with SIGINT when the above
case occurs.
The attached patch attempts to fix these problems.
After applying the attached patch, the behavior of the 'next, Ctrl-C, continue' sequence of commands
is still wrong: this is another bug logged at bpo-14788 with a patch and a test. Applying patch
14788 fixes this.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: