I am having troubles getting pdf interactive debugging to work on a
Django project I have to support, running on Windows.
I can start httpd.exe -X from the command line with the standard setup
ok, but if I try to wrap the application in Debugger() a reload of the
page hangs and times out. No change at the command line (i.e. PDB
One thing I noticed is that I cannot stop httpd.exe with CTRL-C at the
command line and have to close cmd.exe directly - not sure if that is
Is the wrapped call as I did even possible with Django? Or any
pointers as to how to get this running?
- Windows XP SP3
- Apache 2.2.1 (apache.org download)
- mod_wsgi 3.3 (binary download from mod_wsgi home)
- Python 2.7.2 (from python.org)
As far as I can tell mod_wsgi is not configured further in the Apache
conf files (just a LoadModule), running in embedded mode (verified as
described in http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode)
import os, sys
def __init__(self, object):
self.__object = object
def __call__(self, *args, **kwargs):
import pdb, sys
debugger = pdb.Pdb()
debugger.use_rawinput = 0
return self.__object(*args, **kwargs)
debugger.quitting = 1
#Calculate the path based on the location of the WSGI script.
project = os.path.dirname(apache_configuration)
workspace = os.path.dirname(project)
#Add the path to 3rd party django application and to django itself.
os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'
application = Debugger(django.core.handlers.wsgi.WSGIHandler())