mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
react to interrupts differently
This commit is contained in:
parent
bba77af37a
commit
d6c3f25f3e
1 changed files with 5 additions and 0 deletions
|
|
@ -9,6 +9,8 @@
|
||||||
# - Where and when to stop exactly when 'next' encounters a return?
|
# - Where and when to stop exactly when 'next' encounters a return?
|
||||||
# (should be level-based -- don't trace anything deeper than current)
|
# (should be level-based -- don't trace anything deeper than current)
|
||||||
# - Show stack traces upside-down (like dbx/gdb)
|
# - Show stack traces upside-down (like dbx/gdb)
|
||||||
|
# - When stopping on an exception, show traceback stack
|
||||||
|
# - Merge with tb (for post-mortem usage)
|
||||||
|
|
||||||
import string
|
import string
|
||||||
import sys
|
import sys
|
||||||
|
|
@ -120,6 +122,9 @@ class Pdb(Cmd):
|
||||||
if self.botframe is None:
|
if self.botframe is None:
|
||||||
self.botframe = frame
|
self.botframe = frame
|
||||||
if where == 'exception':
|
if where == 'exception':
|
||||||
|
if self.whatnext == 'continue' and \
|
||||||
|
arg[0] is not KeyboardInterrupt:
|
||||||
|
return self.trace
|
||||||
stop = 1
|
stop = 1
|
||||||
elif self.whatnext == 'continue':
|
elif self.whatnext == 'continue':
|
||||||
stop = 0
|
stop = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue