I have a Django application and I set Visual Studio Code to debug it using the default launch.json
configuration. When I start the server ( manage.py runserver
) and make a request, VSCode stops at the first breakpoint (that is correct), but when I step into a function, VSCode never follows/shows Django source code itself and I would like to see what is happening inside that Django source code.
How could I configure VSCode to follow/show Django (and Django REST) source code while debugging Django applications?
EDIT 2019-05-07 : With VSCode 1.33.1, the option debugStdLib
is obsoleted and it has been replaced by justMyCode
, that is exactly the opposite. So to debug Django code, justMyCode
has to be set to false
in launch.json
.
Once you have debugging working, all you need to do is add the following setting into your launch.json
file for the debug configuration used for Django
:
"debugStdLib": true,
This flag tells the Python debugger that you wish to debug standard library code.
Eg:
{
"name": "Python: Django",
"type": "python",
"request": "launch",
"debugStdLib": true,
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.