It is possible to use pdb (or ipdb: https://pypi.python.org/pypi/ipdb) by 
inserting a set_trace() call and then running the django dev server with 
`manage.py runserver`. For example, the following will print the number of 
database queries before and then after a function which touches the 
database and, drop you into the pdb shell. This of course causes the server 
to block.

from django.db import connection
import pdb

print len(connection.queries)
structure = get_data()
print len(connection.queries)
pdb.set_trace()



On Tuesday, November 5, 2013 1:29:28 PM UTC-5, Harjot Mann wrote:
>
> I want to know that how can we debug django applications? 
> I got pdb but I think in this some commands are need to use and then I 
> come to know about pycharm. 
> Is it good? 
> I successfully installed it but dont' know how to use it? 
> Anyone please help me.. 
> -- 
> Harjot Kaur Mann 
> Blog: http://harjotmann.wordpress.com/ 
> Daily Dairy: http://harjotmann.wordpress.com/daily-diary/ 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a9cd55db-843a-4f44-b8b0-3549d120611f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to