title: Pre-run hook in flask when debugging in VS Code (on_starting gunicorn equivalent)
body: <p>What is the correct way of establishing a pre-run hook function  for a flask app?</p>
  <p>When running with gunicorn, its own config file does that for me (see below).
  How do I hook this function when debugging using flask's WSGI in VS Code?</p>
  <p><strong>Note</strong>: my goal is also to keep import-time and runtime segregated, thus calling a function before <code>app = Flask(__name__)</code> is not an option.</p>
  <pre class="lang-py prettyprint-override"><code># guniconr_config.py
  on_starting(server):
      # doing pre-run stuff...
  
  
  preload_app = True
  bind = '0.0.0.0:3000'
  </code></pre>
  <p><code>gunicorn --config gunicorn_config.py main:app</code></p>
  <p>I looked inside the Flask debugging guide in VS Code with no luck. Am I approaching the whole development workflow in an unsuitable way?</p>