Closed paulacamargo25 closed 3 months ago
A window will open with a list of options, choose Python Debugger > Django.
@paulacamargo25 Are you sure about "Django"? Shouldn't it be "Flask"?
A window will open with a list of options, choose Python Debugger > Django.
@paulacamargo25 Are you sure about "Django"? Shouldn't it be "Flask"?
Yes sorry, i just update the description
Refs: https://github.com/microsoft/vscode-python-debugger/issues/161
Complexity: 3
Create Issue
Automatically detect a Flask file, and show it.
Steps
Open a Flask Project if you already have one or you can also create one following the steps in the Flask Tutorial.
Head over to the Run And Debug tab, and click on create a launch.json file.
A window will open with a list of options, choose Python Debugger > Flask.
Verification
Browse Files...
and select the file that you want.Notes
Flask's application detection works by looking for the wsgi.py, app.py and init.py files in the root or in a subdirectory just one level lower and looking for them to have the declaration of a flask application
app = Flask(
. So you can try moving the python file and changing the name, and check that the detection still works.