Skip to content

Instantly share code, notes, and snippets.

@beaukinstler
Created June 20, 2019 15:08
Show Gist options
  • Save beaukinstler/967a346940686daf52693d38b95d2162 to your computer and use it in GitHub Desktop.
Save beaukinstler/967a346940686daf52693d38b95d2162 to your computer and use it in GitHub Desktop.
vscode launch.json for python flask and pytest
{
// 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": "flaskr",
"FLASK_ENV": "development",
"FLASK_DEBUG": "1"
},
"debugOptions": [
"WaitOnAbnormalExit",
// "WaitOnNormalExit",
"RedirectOutput"
],
"args": [
"run",
// "--no-debugger",
// "--no-reload"
],
"envFile": ".env_dev",
"jinja": true
},
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"env": {
"FLASK_APP": "flaskr",
"FLASK_ENV": "development",
"FLASK_DEBUG": "1"
},
"envFile": ".env_dev",
"console": "integratedTerminal"
},
{
"name": "PyTest: Flask",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${config:python.pythonPath}",
"module": "pytest",
"args": [
"-v",
"-m not crypto and not s3_slow and not s3",
"-m pyfish_web_gui",
// "-k flaskr/test_blog",
// "-m pfileset",
// "-m cryto_gpg",
],
"cwd": "${workspaceRoot}",
"env": {
"FLASK_APP": "flaskr",
"FLASK_ENV": "testing",
"FLASK_DEBUG": "1"
},
// "envFile": "tests/.env_test",
"debugOptions": [
"WaitOnAbnormalExit",
// "WaitOnNormalExit",
"RedirectOutput"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment