More Tools for Debugging Django

As a follow up to this post, here are a couple other highly recommended tools for Django development and debugging.

The first one is the widely recommended django-devserver from David Cramer. It serves as a drop-in replacement for Django’s built-in runserver command with numerous features:

  • An extendable interface for handling things such as real-time logging.
  • Integration with the werkzeug interactive debugger.
  • Threaded (default) and multi-process development servers.
  • Ability to specify a WSGI application as your target environment.

Have a look at the various modules that can be enabled including SQLRealTimeModule, SQLSummaryModule, and AjaxDumpModule among others.

Be sure to note that if you’re using Django 1.6, the current version of devserver (0.7.0) is broken (infinite recursion loop in modules/ There’s a ticket open with a suggested fix that works for me (change util.CursorDebugWrapper to util.CursorWrapper in, but no official solution yet.

The second application is django-extensions which offers a ton of useful commands including shell_plus (autoload all your models) and runserver_plus (standard runserver stuff but with the Werkzeug debugger baked in).

It’s worth noting that Werkzeug is also available via devserver but if you’re looking for a quick overview on how to use it, check out the runserver_plus page.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s