I would like to be able to debug a Django application in Visual Studio Code. I have virtualenv, a change has been made to the launch.json file, which looks like this:
{
"name": "Django",
"type": "python",
"request": "launch",
"stopOnEntry": true,
"pythonPath": "${workspaceRoot}/.venv/bin/python2.7",
"program": "${workspaceRoot}/mysite/manage.py",
"args": [
"runserver"
],
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"DjangoDebugging",
"RedirectOutput"
]
},
put some gaps in the code and run it. Unfortunately, execution does not stop on a line with breakpoints. I tried the same without virtualenv and everything worked perfectly.
Please indicate what I am doing wrong here.
source
share