Hard for me to suggest much else right now. If you have a specific issue
with code that might be caused by running under mod_wsgi then you could
always explain it as can see if know about issue already.
On Wednesday, 1 February 2012, booltype <sawall
...@gmail.com> wrote:
> Hi,
> 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
> showing).
> 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
> relevant.
> Is the wrapped call as I did even possible with Django? Or any
> pointers as to how to get this running?
> Thanks
> Stefan
> Software versions:
> ==================
> - 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)
> mod_wsgi configuration
> ======================
> 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)
> django.wsgi
> ===========
> import os, sys
> class Debugger:
> def __init__(self, object):
> self.__object = object
> def __call__(self, *args, **kwargs):
> import pdb, sys
> debugger = pdb.Pdb()
> debugger.use_rawinput = 0
> debugger.reset()
> sys.settrace(debugger.trace_dispatch)
> try:
> return self.__object(*args, **kwargs)
> finally:
> debugger.quitting = 1
> sys.settrace(None)
> #Calculate the path based on the location of the WSGI script.
> apache_configuration= os.path.dirname(__file__)
> project = os.path.dirname(apache_configuration)
> workspace = os.path.dirname(project)
> sys.path.append(workspace)
> #Add the path to 3rd party django application and to django itself.
> sys.path.append('d:\\project')
> sys.path.append('d:\\project\\python27\\Lib\\site-packages\\django')
> sys.path.append('d:\\project\\python27\\Lib\\site-packages\\django')
> os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'
> import django.core.handlers.wsgi
> application = Debugger(django.core.handlers.wsgi.WSGIHandler())
> --
> You received this message because you are subscribed to the Google Groups
"modwsgi" group.
> To post to this group, send email to modwsgi@googlegroups.com.
> To unsubscribe from this group, send email to
modwsgi+unsubscribe@googlegroups.com.
.