New submission from Fabio Zadrozny <fab...@users.sourceforge.net>:
Right now, debuggers can deal with handled exceptions by detecting the 'exception' event, but it's hard to know if the exception is handled or unhandled at that point (so, debuggers end up checking if it happens in a top-level function, but this isn't good if the user started the code and did a remote attach later on, where the top-level code is still user code). My suggestion would be creating another event type (such as 'exception_return') which would be issued after the 'return' event with the same information passed on the 'exception' info so that debuggers can detect that some exception is unhandled (the 'return' would still be issued as usual to minimize breakage to existing debuggers). Another option could be adding that information to the frame itself during a 'return' event (and then removing right after calling the debugger to avoid any cycles) -- although I think the other option is better to avoid making the frame bigger. ---------- components: Interpreter Core messages: 321492 nosy: fabioz priority: normal severity: normal status: open title: Provide debuggers with a way to know that a function is exiting with an unhandled exception. type: enhancement versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34099> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com