Xavier de Gaye added the comment: > On finalizing pdb can stop working at some time, but debugging on > finalization stage can be still useful in certain cases.
Agreed that debugging on finalization stage is useful. Debugging on finalization stage does not seem to work though: =============================== class C: def __del__(self): print('deleted') c = C() import pdb; pdb.set_trace() x = 1 =============================== $ python3 bar.py > /tmp/bar.py(7)<module>() -> x = 1 (Pdb) step --Return-- > /tmp/bar.py(7)<module>()->None -> x = 1 (Pdb) step deleted $ =============================== Maybe this is another issue. > Xavier, your proposition noticeably changes current behavior as I understand > it. For now set_trace() works as breakpoint set up by program, you can go > out of debugged function and it's very convenient from my perspective. This proposition only sets the global trace function to None on returning from the bottom frame, i.e. the oldest frame in the stack. So you can still use set_trace() as a hard-coded breakpoint and continue the debugging session out of the debugged function. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13044> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com