-
Notifications
You must be signed in to change notification settings - Fork 552
Closed
Labels
Milestone
Description
Issue Type: Bug
Steps to reproduce problem:
- launch.json configuration as given below:
{
"name": "Docker: Python - Flask",
"type": "docker",
"request": "launch",
"preLaunchTask": "docker-run: debug",
"python": {
"pathMappings": [
{
"localRoot": "${workspaceFolder}/web/",
"remoteRoot": "/app"
}
],
"host": "localhost",
"port": 5000,
"projectType": "flask",
},
"removeContainerAfterDebug": true}
}
task.json given below:
{
"type": "docker-build",
"label": "docker-build",
"platform": "python",
"dockerBuild": {
"tag": "<tag name removed>",
"dockerfile": "${workspaceFolder}/web/Dockerfile",
"context": "${workspaceFolder}/web/",
"pull": true
}
},
{
"type": "docker-run",
"label": "docker-run: debug",
"dependsOn": [
"docker-build"
],
"dockerRun": {
"containerName": "<container name removed>",
"env": {
"FLASK_APP": "<app name removed>",
"FLASK_ENV": "development",
"FLASK_DEBUG": "1"
},
"volumes": [
{
"containerPath": "/app", "localPath": "${workspaceFolder}/web/"
},
],
"envFiles": [
"${workspaceFolder}/web/.env"
],
"ports": [
{
"containerPort": 5000, "hostPort": 5000
}
]
},
"python": {
"args": [
"run",
"--host",
"0.0.0.0",
"--port",
"5000",
],
"module": "flask",
}
}
- Run debugger
- Make edit anywhere on a python file and save
Results
Expected results:
Flask hot reloads.
Actual results:
Last line in debug console is:
* Detected change in '/<python file name>.py', reloading
and then the debugger simply stops.
Apologies but I do not have a code snippet available for copying!
Reactions are currently unavailable