Hot reload not working when serving with waitress

Hi Everyone,

I’ve found that Dash’s hot reload feature does not work when I serve my app using waitress.

I’m using waitress this way:

app.enable_dev_tools(debug=True)
waitress.serve(app.server, host="127.0.0.1", port=8050)

And when I change one of my app files I expect to see my browser page refreshed but it doesn’t. (It works when I revert to serving with Dash: app.run_server(debug=True))

I’ve opened a bug issue with a full repro but I’m also trying to figure out how to fix or work around by myself.

I’ve tried step debugging around the _reload_watch_thread code in dash.py while hot reload is working (not using waitress) but I’ve found that:
a. The folders being watched do not include my app folder.
b. Breakpoints are not hit when I change my app code.

Do I deduce correctly that that’s not where I should be looking?

Where can I find the code that triggers “hot reload” when I change one of my own app files?

Thanks,
urig