I\'m trying to dump a list of all active threads including the current stack of each. I can get a list of all threads using threading.enumerate(), but i can\'t figure out a
For Python 3.3 and later, there is faulthandler.dump_traceback().
The code below produces similar output, but includes the thread name and could be enhanced to print more information.
for th in threading.enumerate(): print(th) traceback.print_stack(sys._current_frames()[th.ident]) print()