RecursionError is not caught by the debugger
- Dominant language
- Python
- Stars
- 3.2k
- Forks
- 245
- Avg merge
- 13m
- Merged PRs (30d)
- 5
Description
With something like
```py
def test():
raise ValueError
import pudb
pudb.set_trace()
test()
```
If you step over `test()`, it tells you that an exception has been raised. But with
```py
def test():
test()
import pudb
pudb.set_trace()
test()
```
The 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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce both examples: stepping over the recursive call with pudb.set_trace(), and running the file with python -m pudb. Compare how pudb and bdb handle ValueError versus RecursionError, including the post-mortem path. Done means RecursionError is caught and presented consistently by the debugger instead of terminating with an unexpected traceback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100