Skip to content

Commit a44c255

Browse files
authored
django debug config in experimental debugger (#957)
Fixes #956
1 parent 77f3612 commit a44c255

File tree

1 file changed

+44
-6
lines changed

1 file changed

+44
-6
lines changed

package.json

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -932,10 +932,9 @@
932932
"name": "Python Experimental: Terminal (integrated)",
933933
"type": "pythonExperimental",
934934
"request": "launch",
935-
"stopOnEntry": true,
936935
"pythonPath": "^\"\\${config:python.pythonPath}\"",
937936
"program": "^\"\\${file}\"",
938-
"cwd": "",
937+
"cwd": "^\"\\${workspaceFolder}\"",
939938
"console": "integratedTerminal",
940939
"env": {},
941940
"envFile": "^\"\\${workspaceFolder}/.env\"",
@@ -950,16 +949,37 @@
950949
"name": "Python Experimental: Terminal (external)",
951950
"type": "pythonExperimental",
952951
"request": "launch",
953-
"stopOnEntry": true,
954952
"pythonPath": "^\"\\${config:python.pythonPath}\"",
955953
"program": "^\"\\${file}\"",
956-
"cwd": "",
954+
"cwd": "^\"\\${workspaceFolder}\"",
957955
"console": "externalTerminal",
958956
"env": {},
959957
"envFile": "^\"\\${workspaceFolder}/.env\"",
960958
"debugOptions": [],
961959
"internalConsoleOptions": "neverOpen"
962960
}
961+
},
962+
{
963+
"label": "Python Experimental: Django",
964+
"description": "%python.snippet.launch.django.description%",
965+
"body": {
966+
"name": "Django",
967+
"type": "python",
968+
"request": "launch",
969+
"pythonPath": "^\"\\${config:python.pythonPath}\"",
970+
"program": "^\"\\${workspaceFolder}/manage.py\"",
971+
"cwd": "^\"\\${workspaceFolder}\"",
972+
"console": "integratedTerminal",
973+
"internalConsoleOptions": "neverOpen",
974+
"args": [
975+
"runserver",
976+
"--noreload",
977+
"--nothreading"
978+
],
979+
"env": {},
980+
"envFile": "^\"\\${workspaceFolder}/.env\"",
981+
"debugOptions": []
982+
}
963983
}
964984
],
965985
"configurationAttributes": {
@@ -1052,20 +1072,38 @@
10521072
"request": "launch",
10531073
"pythonPath": "${config:python.pythonPath}",
10541074
"program": "${file}",
1055-
"cwd": "",
1075+
"cwd": "${workspaceFolder}",
10561076
"console": "integratedTerminal",
10571077
"env": {},
10581078
"envFile": "${workspaceFolder}/.env",
10591079
"debugOptions": [],
10601080
"internalConsoleOptions": "neverOpen"
10611081
},
1082+
{
1083+
"name": "Python Experimental: Django",
1084+
"type": "pythonExperimental",
1085+
"request": "launch",
1086+
"pythonPath": "${config:python.pythonPath}",
1087+
"program": "${workspaceFolder}/manage.py",
1088+
"cwd": "${workspaceFolder}",
1089+
"console": "integratedTerminal",
1090+
"env": {},
1091+
"envFile": "${workspaceFolder}/.env",
1092+
"args": [
1093+
"runserver",
1094+
"--noreload",
1095+
"--nothreading"
1096+
],
1097+
"debugOptions": [],
1098+
"internalConsoleOptions": "neverOpen"
1099+
},
10621100
{
10631101
"name": "Python Experimental: Current File (External Terminal)",
10641102
"type": "pythonExperimental",
10651103
"request": "launch",
10661104
"pythonPath": "${config:python.pythonPath}",
10671105
"program": "${file}",
1068-
"cwd": "",
1106+
"cwd": "${workspaceFolder}",
10691107
"console": "externalTerminal",
10701108
"env": {},
10711109
"envFile": "${workspaceFolder}/.env",

0 commit comments

Comments
 (0)