title: Python thread debugging
body: <p>I am debugging a python program with pdb. The program will start a new thread. </p>
  
  <pre><code>newThread = Thread(group = None,target = dosomething,name = "thename",
                                 args = (),kwargs = {})
  
  def dosomething():
      balaba
  </code></pre>
  
  <p>Use the normal pdb command e.g. -b to set break point in the line of the new thread(e.g. line of balaba), seems will not trigger the breakpoint.</p>
  
  <p>The question I want to ask is: is there a way I can break into the new thread target function to look into the behavor the new thread? </p>