How to trace a thread in python

published May 29, 2015 02:10   by admin ( last modified May 30, 2015 10:38 )

I noticed that a thread in a python application that I am debugging, did not turn up in the trace print. Turns out there is a special settrace call you make from the threading package. I linked below to python 3 but it works in python 2.7 as well.

threading.settrace(thread_traceit)

17.1. threading — Thread-based parallelism — Python 3.4.3 documentation