title: Debugging flask with pdb
body: <p>I'm trying to use pdb to debug flask application. 
  Setting break point is easy; I just use <code>b index</code> to break when index() is invoked or <code>b 44</code> to set a break point at line 44. </p>
  
  <p>Breakpoint works with <code>b 44</code> which is the start of the main, but <code>b index</code> doesn't work. 
  In the command line, "Index is called" is printed to indicate that the method is invoked, but it does not stop in the pdb. </p>
  
  <pre><code>@app.route('/', methods=['GET', 'POST'])
  def index():
      print "Index is called"
      name = None
      ...
      return render_template('index.html', form=form, name=name)
  
  if __name__ == '__main__':
      manager.run() # line 44
  </code></pre>
  
  <p>What might be wrong? </p>