launch.json
{
"version": "0.2.0",
"configurations": [
{
"python": "${workspaceFolder}/%user%/env/bin/python",
"name": "Python: Flask",
"type": "python",
"request": "launch",
"module": "flask",
"env": {
"FLASK_DEBUG": "0",
"FLASK_ENV": "development",
},
"args": [
"run",
"--no-debugger",
"--no-reload"
],
"jinja": true,
"justMyCode": false
}
]
}
For custom files:
{
"name": "Python: Current File (env)",
"python": "/home/sup/ven/bin/python",
"type": "python",
"request": "launch",
"program": "${file}",
"justMyCode": false,
"env": {
"ENV_VAR": "dev",
}
}
settings.json
We can define global variables
{
"python.defaultInterpreterPath": "venv/bin/",
"python.terminal.activateEnvInCurrentTerminal": true,
"terminal.integrated.env.linux": {
"CUSTOM_ENV_VAR": "/here/goes/ENV/value"
}
}