I am debugging a huge legacy codebase, actually porting it from python2 to python3. Unfortunately there are some exceptions that seem to be handled and printed but the previous developer was not wise enough to print a stack trace that could tell me where exactly the exception was triggered.
Specifically, I am also porting the code from GTK+2 to GTK+3 and I get many of these output lines:
TypeError: expose() missing 1 required positional argument: 'event'
At this point, it seems that the only option left is to globally hijack the print()
function to at least display in which module and which line it was called.
Do you know if that's possible in python3 ? (I am a veteran of python2 but a newbie of python3)
Any other suggestions on how could I solve this problem?