Skip to content

Instantly share code, notes, and snippets.

@titusfx
Last active December 18, 2023 23:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save titusfx/01f6042d4d2a8ba09201e0dafaabb00b to your computer and use it in GitHub Desktop.
Save titusfx/01f6042d4d2a8ba09201e0dafaabb00b to your computer and use it in GitHub Desktop.
Django configuration to Debug built in commands and Custom ones on VSCode
{
"version": "0.2.0",
"configurations": [ {
"name": "Django Command",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": [
"${input:commandToRun}",
],
"justMyCode": false
},
{
"name": "Python: Django",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": [
"runserver"
],
"django": true
}, {
"name": "Django Debug Current Command File",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": [
"${fileBasenameNoExtension}"
]
}, {
"name": "Django startproject Command",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": [
"startproject",
"restaurants"
],
"justMyCode": false
},
],
"inputs": [{
"id": "commandToRun",
"description": "Select client or server",
"type": "pickString",
"options": [
"runserver",
"startapp",
"changepassword",
"createsuperuser",
"startprojects",
"A CUSTOM COMMAND",
"remove_stale_contenttypes",
"check",
"compilemessages",
"createcachetable",
"dbshell",
"diffsettings",
"dumpdata",
"flush",
"inspectdb",
"loaddata",
"makemessages",
"makemigrations",
"migrate",
"sendtestemail",
"shell",
"showmigrations",
"sqlflush",
"sqlmigrate",
"sqlsequencereset",
"squashmigrations",
"test",
"testserver",
"register_models_admin",
"clearsessions",
"collectstatic",
"findstatic"
],
"default": "runserver"
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment