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
ctrl+c stops the debugging with pyflyby but not with ipdb
Reproducer:
> cat /var/tmp/a.py
import os; print(os.getpid());
while True:
import time
time.sleep(8)
break
p = 1 + "!@#"
> python /var/tmp/a.py &
85791
> py -d 85791
Entering debugger. Use 'n' to step, 'c' to continue running, 'q' to quit Python completely.
> /var/tmp/a.py(5)<module>()
3 import time
4 time.sleep(8)
----> 5 break
6 p = 1 + "!@i#"
7 raise Exception("A")
ipdb> ^C (**Ctrl+C**)
[email protected](hyd|codemill):~:> Exception ignored in: <generator object _DebuggerCtx at 0x7f39ea79ac00>
Traceback (most recent call last):
File "/usr/local/python/python-3.10/std/lib64/python3.10/site-packages/pyflyby/_dbg.py", line 241, in _DebuggerCtx
File "/opt/python/python-3.10/lib64/python3.10/contextlib.py", line 153, in __exit__
File "/usr/local/python/python-3.10/std/lib64/python3.10/site-packages/pyflyby/_dbg.py", line 163, in _StdioCtx
File "/opt/python/python-3.10/lib64/python3.10/contextlib.py", line 153, in __exit__
File "/usr/local/python/python-3.10/std/lib64/python3.10/site-packages/pyflyby/_util.py", line 504, in nested
File "/opt/python/python-3.10/lib64/python3.10/contextlib.py", line 576, in __exit__
File "/opt/python/python-3.10/lib64/python3.10/contextlib.py", line 561, in __exit__
OSError: [Errno 5] Input/output error
with ipdb, this doesn't happen
> ipdb /var/tmp/a.py
> /var/tmp/a.py(1)<module>()
----> 1 import os; print(os.getpid());
2 while True:
3 import time
ipdb> Ctrl+C --> No effect
Lets add a signal handler to make the behavior similar to ipdb debugger
The text was updated successfully, but these errors were encountered:
dshivashankar1994
changed the title
ctrl+c stops the debugging with pyflyby but not with ipdb
ctrl+c (SIGINT) stops the debugging with pyflyby but not with ipdb (PyInf#8704)
Apr 18, 2023
sac111gp
changed the title
ctrl+c (SIGINT) stops the debugging with pyflyby but not with ipdb (PyInf#8704)
ctrl+c (SIGINT) stops the debugging with pyflyby but not with ipdb (PyInf#10417)
Jun 12, 2023
ctrl+c stops the debugging with pyflyby but not with ipdb
Reproducer:
with ipdb, this doesn't happen
Lets add a signal handler to make the behavior similar to ipdb debugger
The text was updated successfully, but these errors were encountered: