Hi, here is your answer... I think this may helpful to you..
In PHP, you were probably used to the awesome xdebug extension.
In Python, spawn the classic debugger with (put this anywhere you'd put xdebug_break():
import pdb; pdb.set_trace()
My favorite is with the ipdb module (pip install ipdb):
import ipdb; ipdb.set_trace()
You can also use werkzeug (pip install werkzeug) and django-extensions (pip install django-extensions and add django_extensions to settings.INSTALLED_APPS), which provides the runserver_plus command.
It's really great. That is also one of the things that I'll probably make you never look back at python php again. Anyway, runserver_plus is like runserver but it will replace the default django stacktrace page with an ajax interactive shell available at each frame of the stacktrace. Of course you can get it by puting something like crash or random_undefined_variable_name anywhere in your code.