sys.gettrace()

sys.gettrace()

Return the global debug tracing function set with sys.settrace. See the debugger chapter in the library manual.