How to debug in Django?
author
,
Aspirant Programmer

How can you debug the code while doing development and track the issue fast?

  • Total 1 Answer
  • 332
Can You answer this question?
author
,
Aspirant Programmer

To start debugging in django while doing development you will need to follow below steps and get to go:

1- $pip install django_extensions

Now include in settings.py under INSTALLED_APPS as 'django_extensions'.

2- $pip install werkzeug

You have set all required things for debugging, just need to write below statement where you want to debug:

3- assert False, latest_poll_list  

It will display in browser and start debugging, here latest_poll_list is result set of records.

django_extensions gives new feature to run server as runserver_plus

$python manage.py runserver_plus