-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breakpoints are not hitting in VS Code while debugging Python Flask app #4355
Comments
@iamshivprasad it looks like you stripped out {
"name": "Flask",
"type": "python",
"request": "launch",
"module": "flask",
"env": {
"FLASK_APP": "analyticspyengine.webapp",
"FLASK_ENV": "development",
"FLASK_DEBUG": "0"
},
"args": [
"run",
"--no-debugger",
"--no-reload"
],
"jinja": true
} |
This was posted simultaneously to Stack Overflow: https://stackoverflow.com/questions/54592727/breakpoints-are-not-hitting-in-vs-code-while-debugging-python-flask-app . |
@brettcannon Thank you, I think this fixed my issue. I have taken the config from one of my other apps where I don't face this issue. Surprisingly, I'm still not using these flags there and works perfectly fine. The difference between these two apps is the I'm curious to know what exactly went wrong, if you can give a bit of insight. Also, I'd like to know the significance of these flags. Once again, thank you for saving my day :) |
Glad it worked out! |
And the flags basically turn off the automatic reload functionality of Flask which trips up our debugger. We're working on making them work together, but we're not quite there yet. |
@brettcannon Thank you. |
I'm new to Python Flask development and VS Code. I've been trying to create an app by referring the below tutorials.
https://code.visualstudio.com/docs/python/tutorial-flask
https://github.com/Microsoft/python-sample-vscode-flask-tutorial\
https://code.visualstudio.com/docs/python/debugging
Repo for reference: https://github.com/iamshivprasad/analytics
Cloned folder structure is:
.
.
.
I am able to launch the program successfully with below settings in
launch.json
.Content of
webapp.py
Content of
analyticspyengine/__init__.py
I'm facing the following problems. Completely helpless and frustrated!!!
**1) Execution is not hitting any breakpoints
Is it an issue? Could someone shed some light?
Environment:
VS Code 1.31.0
Python Extension - 2019.1.0 (29 Jan 2019)
Python Version 3.7.1 64-bit
Flask Version 1.0.2
Windows 10
The text was updated successfully, but these errors were encountered: