If I’m typing in a dash app while the debugger is up, the hot reload doesn’t work. I can just paste a comment and it’ll still error out
Exception has occurred: SystemExit
3
File "/home/myhome/PycharmProjects/myapp/main.py", line 26, in <module>
app.run_server(host='0.0.0.0', debug=debug, threaded=False)
SystemExit: 3
The desired functionality is for the app to reload, like it does in Pycharm (and probably other IDEs)
Whats worse about this problem is that the line with the error is selected, “app.run_server(host=‘0.0.0.0’, debug=debug, threaded=False)”
so if I’m typing (which I always am, because thats what triggers the error) it’ll delete the selected text. So I always have to undo, every time. I’ve been using hot reload of dash apps for quite a while, so its been a struggle stopping the app manually before I start typing every time now
To reproduce
start a dash app, have it running
type anything, anywhere, and keep typing
watch the app.run_server line get erased
This may have something to do with Flask. I haven’t used VSCode, only cursor and pycharm. pycharm doesn’t have this problem, it refreshes the app appropriately.
Note that this break happens even if I do something that couldn’t possibly change the execution; adding to a comment, for instance.
(this is cross-posted from Dash problems with hot reload, and Auto-select of erroring code in debugger is bad ux. No update in a month there, and this should be in bug reports anyway, so posting here instead of bumping that one. This has been an issue for a long time)