This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: after continue in pdb stops in
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.5
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, xdegaye
Priority: normal Keywords:

Created on 2014-09-27 08:40 by xdegaye, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg227666 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2014-09-27 08:40
With the following script:

import time

def foo():
    import pdb; pdb.set_trace()
    while 1:


Hitting ^C after continue gives:

$ ./python
-> while 1:
(Pdb) continue
Program interrupted. (Use 'cont' to resume).
> Lib/
-> @_wraps(_signal.signal)

This is fixed with the following change:

diff --git a/Lib/ b/Lib/
--- a/Lib/
+++ b/Lib/
@@ -186,9 +186,9 @@
             raise KeyboardInterrupt
         self.message("\nProgram interrupted. (Use 'cont' to resume).")
-        self.set_trace(frame)
         # restore previous signal handler
         signal.signal(signal.SIGINT, self._previous_sigint_handler)
+        self.set_trace(frame)

     def reset(self):
msg278535 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2016-10-12 18:26
Fixed in issue 20766.
Date User Action Args
2022-04-11 14:58:08adminsetgithub: 66692
2016-10-12 18:26:51xdegayesetstatus: open -> closed
resolution: out of date
messages: + msg278535

stage: resolved
2014-09-27 08:40:39xdegayecreate