I was addicted to it at work, so I made a personal note.
(Since there are already abundant commentary articles, it is omitted)
flask.Flask
in the server
option of dash.Dashapp.py
import flask
import dash
_app = flask.Flask(__name__)
app = dash.Dash(__name__, server=_app)
The following configuration is added to launch.json.
launch.json
{
"name": "Python: Flask",
"type": "python",
"request": "launch",
"module": "flask",
"env": {
"FLASK_APP": "app.py",
"FLASK_ENV": "development",
"FLASK_DEBUG": "0"
},
"args": [
"run",
"--no-debugger",
"--no-reload",
#If necessary--host and--Add port
],
"jinja": true
}
You can debug the behavior of Dash on the browser (variable creation & update, callback, etc.) in real time.
Recommended Posts