[wingide-users] Debugging under mod-Python
tms at zeetix.com
Thu May 29 11:18:52 MDT 2008
I'm using Wing IDE Professional, v3.1.1-1 (rev 18164). I'm running current
WinXP, Apache /2.2.8 (win32), mod_python/3.3.1, Python 2.5.
Everything goes through one mod_python handler, and several uri requests are
aliased through PythonOption entries into that single mod-python handler.
This lets me switch the same python server code between cgi and mod_python
"modes" -- debugging is much easier under cgi.
This is a complex AJAX server application that mostly works well in both
modes. I'm trying to debug a particular issue with the way mod_python caches
object state for a particular request type. I've followed the directions in
the Wing documentation, imported wingdbstub, invoked "StartDebug", and so
Now the problem. I am able to set a breakpoint under mod_python, and the IDE
does in fact intercept the request and pause at that breakpoint -- the first
time my application is started. I can step through the startup sequence and
all seems well. I then press the "Debug" button -- asking the IDE to
continue. All appears fine and the application comes up as expected. Sadly,
however, the red "stop sign" icon never goes out in the IDE menu bar, even
though initial http request is long gone.
>From that point onward, the application seems to run with no interaction
from the IDE at all. Subsequent requests do not seem to provoke any of the
usual status-line messages at the bottom of the open IDE source files, the
little "bug" doesn't change -- nada.
This application, by design, *must* submit two requests (with different
commands) to the server on the initial load. It then draws a Google map, and
each user-click on a map icon provokes another (ajax) request to the server.
Each of those requests is handled by Python, and when I'm in "cgi-mode",
breakpoints in the code that processes those requests work as expected.
I want to startup the mod_python server, set a breakpoint in a request
handler method, click on a Google map icon, and I then want execution in the
python method invoked by the request to pause at the breakpoint so that I
can look at the current context.
What must I do to get this behavior under mod_python?
More information about the wingide-users