Reputation: 49
Flask newbie here on Windows 10.
I'm following through the basic Flask tutorial to the letter, but the output of running the debugger is always this:
& 'C:\Users\User\AppData\Local\Programs\Python\Python38\python.exe' 'c:\Users\User\.vscode\extensions\ms-python.python-2020.7.96456\pythonFiles\lib\python\debugpy\launcher' '51698' '--' '-m' 'flask' 'run' '--no-debugger' '--no-reload'
* Serving Flask app "app.py"
* Environment: development
* Debug mode: on
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
The main debug UI controls Step into, Step out and Step over are greyed out. Keyboard shortcuts don't work either.
All settings and configurations are default options and I've tried using a virtual environment and none. Using Python 64 bit v3.85. Debug config = Python: Flask. Launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Flask",
"type": "python",
"request": "launch",
"module": "flask",
"env": {
"FLASK_APP": "app.py",
"FLASK_ENV": "development",
"FLASK_DEBUG": "0" // Also tried with "1"
},
"args": [
"run",
"--no-debugger",
"--no-reload"
],
"jinja": true
}
]
}
What am I missing? Any help appreciated.
Upvotes: 1
Views: 1989
Reputation: 49
Solved:
It is working. I had to open a browser to the right page (in this tutorial localhost:5000/hello/) for the debugger to become active.
Upvotes: 3