Dump stacktraces of all active Threads

As jitter points out in an earlier answer sys._current_frames() gives you what you need for v2.5+. For the lazy the following code snippet worked for me and may help you: print >> sys.stderr, “\n*** STACKTRACE – START ***\n” code = [] for threadId, stack in sys._current_frames().items(): code.append(“\n# ThreadID: %s” % threadId) for filename, lineno, name, … Read more