I've read a couple dozen threads on this issue and I cannot find a solution that has worked for me so any help you can provide for me to understand what is breaking the reloader is greatly appreciated. I'm still fairly new to dev (mainly worked in node, angular and django). I've done tests on mac and ubuntu, with both a minimal flask app and a large application setup via their docs, here is the simplest test of the various attempts I've made:
in terminal:
python3 -m venv virtualenv
source virtualenv/bin/activate
pip install flask
vim server.py
then
from flask import Flask
app = Flask(__name__)
@app.route('/')
def home():
return 'Hi'
wq and then back in terminal:
export FLASK_ENV=development
export FLASK_DEBUG=1
export FLASK_APP=server.py
flask run
now change the return statement string from 'hi' to 'hello' and nothing changes until I hit refresh on the browser. Importantly, the server does announce that there was a change - it just doesn't reload the browser. See output below:
(virtualenv) ➜ test git:(master) ✗ Flask run
* Serving Flask app "server.py" (lazy loading)
* Environment: development
* Debug mode: on
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 297-732-354
* Detected change in '/Users/pb/Documents/code/projects/test/server.py', reloading
* Restarting with stat
* Debugger is active!
* Debugger PIN: 297-732-354
I've tried this with template rendering, with alterations to css files, and like above with simple return statements. Thank you for any help you can offer me.