Skip to content

Instantly share code, notes, and snippets.

@slaveofcode
Last active August 12, 2024 12:55
Show Gist options
  • Save slaveofcode/b4c18efc99c16029913cde3fd2dba3ce to your computer and use it in GitHub Desktop.
Save slaveofcode/b4c18efc99c16029913cde3fd2dba3ce to your computer and use it in GitHub Desktop.
Sample Django Configuration launch.json VSCode (Visual Studio Code)
{
"version": "0.2.0",
"configurations": [
{
"name": "Django",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${workspaceRoot}/venv/bin/python3.4",
"program": "${workspaceRoot}/manage.py",
"args": [
"runserver",
"1818"
],
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput",
"DjangoDebugging"
],
"env": {
"DJANGO_DB_NAME": "aroounddb",
"DJANGO_DB_USER": "codeslave",
"DJANGO_DB_PASSWORD": "codeslave",
"DJANGO_DB_HOST": "172.17.0.2",
"DJANGO_DB_PORT": "5432",
"DJANGO_DEBUG": "True",
"DJANGO_SETTINGS_MODULE": "settings"
}
},
]
}
@evanhutomo
Copy link

CMIIW, small correction for "pythonPath" isn't exist. It should be "python".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment