How To Debug a Django Application in VS CODE (Visual Studio Code)

preview_player
Показать описание
Set breakpoints and debug a live Django Application!

Here's the code snippet for the VS Code configuration you will need to debug a Django app.
{
"name": "BlogTheData",
"python": "/Users/johnsolly/Documents/code/blogthedata/venv/bin/python3",
"type": "python",
"request": "launch",
"console": "internalConsole",
"args": ["runserver"],
"django": true,
"justMyCode": true,
}
And here is a link to Corey Schafer's Django Tutorials (Create your own Django App!)

Time Stamps
05:05 - How to set up the VS Code configuration
Рекомендации по теме
Комментарии
Автор

wow !!!! right to the point and straight forward. saved me probably like 5 hours of researching and trying to work it out. thank you so much!

YevGuyduy
Автор

Spend several hours investigating around. Finally found out that your solution works!!!

qtech
Автор

Thanks, exactly what I was looking for.

MrValVet
Автор


You might also want to add these two lines of code to the end of your test file so you can re-run the test after hitting a breakpoint.

johnsolly
Автор

Thanks for this, very helpful now that I'm back into developing on my Wagtail CMS, which is Django based. This worked perfectly and will greatly increase my productivity. Cheers!

xorengames
Автор

I instantally subscribed. Bro Keep posting. I got you !!!

lionelmuskwe
Автор

Trying to figure this out took me hours! Thank you!

NafisaUmarHajjatee
Автор

How to do if Django is running in a docker ?

SanteeRocks
Автор

Great Content ! I have a question, How to debug Django inside docker ? I use nginx as web server.

electroe
Автор

Than you. It's exactly what I was looking for.

marceherrera
Автор

its not working sir i placed the breakpoint and through the debug console gave the link but doesnt it the breakpoint. why?

akchavshakya
Автор

Great video, short and works perfectly

PaulaAmstutz
Автор

Man you are hero
thank you very much

basil
Автор

great video but not working in window based visual studio django ...i dont know why

nevilpanchal
Автор

Great video very clear thanks. I didn't know the corey's tutorial (thanks for the link).
i just don't understand how to debug generic views, because in views.py instead of return render (....) you have just a class declaration. A good example is in the tutorial of thenewboston chap 29 on youtube (best tutorial serie i've seen) :
At 2:20 he changes views for generic views but i haven't found how to debug that.

olivierdeplanques