title: Cannot debug flask app using pycharm
body: <p>I am trying to debug my flask app but when I start my wsgi script as debug It won't connect. My wsgi.py</p>
  
  <pre><code>from flask_app import app as application
  
  if __name__ == "__main__":
      application.run(host="0.0.0.0", port=5000)
  </code></pre>
  
  <p>and console message</p>
  
  <pre><code>pydev debugger: process 13472 is connecting
  
  Connected to pydev debugger (build 143.1919)
   * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
   * Restarting with stat
  pydev debugger: process 15356 is connecting
  </code></pre>
  
  <p>Running it normally works like a charm. How can I get any errors messages as indication to what is wrong?</p>
  
  <p>EDIT:</p>
  
  <p>it seems that it doesn't open the port in 5000 because when I run netstat -a and wsgi is running in debug mode, I don't see 0.0.0.0:5000 listening or timewait state anywhere.  WHen run normally I can see 0.0.0.0:5000 listening</p>