Message389051
If pdb encounters most exception types, it handles them as would be expected. However, if pdb encounters a RecursionError: maximum recursion depth exceeded while calling a Python object, then it will continue to execute the code accurately, but the debugger itself will no longer interactively wait for user input, but instead, just speed through the rest of execution. The code below reproduces the error on python 3.7, 3.8, and 3.9.
```python3
import sys
import inspect
sys.setrecursionlimit(50)
def except_works() -> None:
raise Exception
try:
except_works()
except Exception as e:
print("Exception was:", e)
def funcy(depth: int) -> None:
print(f"Stack depth is:{len(inspect.stack())}")
if depth == 0:
return
funcy(depth - 1)
try:
funcy(60)
except Exception as e:
print("Exception was:", e)
print("This executes without the debugger navigating to it.")
``` |
|
Date |
User |
Action |
Args |
2021-03-19 02:44:55 | behindthebrain | set | recipients:
+ behindthebrain |
2021-03-19 02:44:55 | behindthebrain | set | messageid: <1616121895.83.0.21835485789.issue43548@roundup.psfhosted.org> |
2021-03-19 02:44:55 | behindthebrain | link | issue43548 messages |
2021-03-19 02:44:55 | behindthebrain | create | |
|