Skip to content

Instantly share code, notes, and snippets.

@GollyJer
Created April 1, 2018 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GollyJer/1ff54e621b6ef79c248ef3138104428b to your computer and use it in GitHub Desktop.
Save GollyJer/1ff54e621b6ef79c248ef3138104428b to your computer and use it in GitHub Desktop.
Visual Studio Code - Python debugger configurations.
{
// 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: File with Terminal",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${config:python.pythonPath}",
"program": "${file}",
"cwd": "${workspaceFolder}",
"env": {},
"envFile": "${workspaceFolder}/.env",
"debugOptions": ["RedirectOutput"]
},
{
"name": "Python: File without Terminal",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${config:python.pythonPath}",
"program": "${file}",
"cwd": "${workspaceFolder}",
"env": {},
"envFile": "${workspaceFolder}/.env",
"debugOptions": ["RedirectOutput"],
"console": "none"
},
{
"name": "Python: Attach",
"type": "python",
"request": "attach",
"localRoot": "${workspaceFolder}",
"remoteRoot": "${workspaceFolder}",
"port": 3000,
"secret": "my_secret",
"host": "localhost"
},
{
"name": "Python: Terminal (integrated)",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${config:python.pythonPath}",
"program": "${file}",
"cwd": "",
"console": "integratedTerminal",
"env": {},
"envFile": "${workspaceFolder}/.env",
"debugOptions": [],
"internalConsoleOptions": "neverOpen"
},
{
"name": "Python: Terminal (external)",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${config:python.pythonPath}",
"program": "${file}",
"cwd": "",
"console": "externalTerminal",
"env": {},
"envFile": "${workspaceFolder}/.env",
"debugOptions": [],
"internalConsoleOptions": "neverOpen"
},
{
"name": "Python: Django",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${config:python.pythonPath}",
"program": "${workspaceFolder}/manage.py",
"cwd": "${workspaceFolder}",
"args": ["runserver", "--noreload", "--nothreading"],
"env": {},
"envFile": "${workspaceFolder}/.env",
"debugOptions": ["RedirectOutput", "DjangoDebugging"]
},
{
"name": "Python: Flask (0.11.x or later)",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${config:python.pythonPath}",
"module": "flask",
"cwd": "${workspaceFolder}",
"env": {
"FLASK_APP": "${workspaceFolder}/app.py"
},
"args": ["run", "--no-debugger", "--no-reload"],
"envFile": "${workspaceFolder}/.env",
"debugOptions": ["RedirectOutput"]
},
{
"name": "Python: Flask (0.10.x or earlier)",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${config:python.pythonPath}",
"program": "${workspaceFolder}/run.py",
"cwd": "${workspaceFolder}",
"args": [],
"env": {},
"envFile": "${workspaceFolder}/.env",
"debugOptions": ["RedirectOutput"]
},
{
"name": "Python: PySpark",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"osx": {
"pythonPath": "${env:SPARK_HOME}/bin/spark-submit"
},
"windows": {
"pythonPath": "${env:SPARK_HOME}/bin/spark-submit.cmd"
},
"linux": {
"pythonPath": "${env:SPARK_HOME}/bin/spark-submit"
},
"program": "${file}",
"cwd": "${workspaceFolder}",
"env": {},
"envFile": "${workspaceFolder}/.env",
"debugOptions": ["RedirectOutput"]
},
{
"name": "Python: Module",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${config:python.pythonPath}",
"module": "module.name",
"cwd": "${workspaceFolder}",
"env": {},
"envFile": "${workspaceFolder}/.env",
"debugOptions": ["RedirectOutput"]
},
{
"name": "Python: Pyramid",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${config:python.pythonPath}",
"cwd": "${workspaceFolder}",
"env": {},
"envFile": "${workspaceFolder}/.env",
"args": ["${workspaceFolder}/development.ini"],
"debugOptions": ["RedirectOutput", "Pyramid"]
},
{
"name": "Python: Watson",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${config:python.pythonPath}",
"program": "${workspaceFolder}/console.py",
"cwd": "${workspaceFolder}",
"args": ["dev", "runserver", "--noreload=True"],
"env": {},
"envFile": "${workspaceFolder}/.env",
"debugOptions": ["RedirectOutput"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment