django-pdb

Add '--pdb' option to 'manage.py runserver' and 'manage.py test'
Download

django-pdb Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Public Domain
  • Publisher Name:
  • Tom Christie
  • Publisher web site:
  • http://tomchristie.com

django-pdb Tags


django-pdb Description

Add '--pdb' option to 'manage.py runserver' and 'manage.py test' Make debugging Django easierdjango-pdb is a Django app for adding pdb.set_trace() to your source files every time you want to break into pdb sucks.Don't do that.Do this.InstallationInstall using pip:pip install django-pdbAdd to your django project:INSTALLED_APPS = ( ... 'django_pdb',)Usagemanage.py runserver --pdbDrops into pdb at the start of every view:bash: testproject/manage.py runserver --pdbValidating models...0 errors foundDjango version 1.3, using settings 'testproject.settings'Development server is running at http://127.0.0.1:8000/Quit the server with CONTROL-C.GET /function "myview" in testapp/views.py:6args: ()kwargs: {}> /Users/tom/github/django-pdb/testproject/testapp/views.py(7)myview()-> a = 1(Pdb)manage.py test --pdbDrops into pdb on test errors/failures:bash: testproject/manage.py test testapp --pdbCreating test database for alias 'default'...E======================================================================>>> test_error (testapp.tests.SimpleTest)----------------------------------------------------------------------Traceback (most recent call last): File "/Users/tom/github/django-pdb/testproject/testapp/tests.py", line 16, in test_error one_plus_one = fourNameError: global name 'four' is not defined======================================================================> /Users/tom/github/django-pdb/testproject/testapp/tests.py(16)test_error()-> one_plus_one = four(Pdb) Requirements: · Python · Django


django-pdb Related Software