Open asmeurer opened 3 years ago
The debugger tries to live on the same stack as the "debuggee" that just ran out of stack space. It's likely that the Python runtime enters the debugger, but then quickly runs out of stack again and thus crashing altogether.
Yeah, that sounds likely. I know you can definitely catch RecursionError in some instances. I've never really understood under what circumstances it does and doesn't work. Presumably Python allows some extra frames on RecursionError to potentially clean it up, but how many?
With something like
If you step over
test()
, it tells you that an exception has been raised. But withThe whole program exits with a traceback. In the case where you instead run
python -m pudb file.py
, the RecursionError is caught, but as an "uncaught exception" (post mortem).I browsed the pudb and bdb code and it isn't clear to me why this is happening.