Debugging Django code on mod_wsgi (how to access ['wsgi.errors']) Debugging Django code on mod_wsgi (how to access ['wsgi.errors']) apache apache

Debugging Django code on mod_wsgi (how to access ['wsgi.errors'])


  1. Try using the django debug toolbar. It can help a great deal with debugging when you can't actually use a debugger.

    Really though, debugging should be done on your development machine. I have yet to see a code issue in production with django that wasn't also occurring on my dev box.

  2. You usually can't print in mod_wsgi. Use the logging module instead. That's really what you want, and the debug toolbar will show you log statements in the page, so you don't even have to look at the file.