[wingide-users] Trying to debug a CGI script

Wingware Support support at wingware.com
Mon Sep 5 08:02:51 MDT 2011

On 9/3/11 5:41 PM, Iain Simpson wrote:
> I am starting to work my way through the 'Programming Python' Book 
> (Mark Lutz 3rd Ed) and am having some problem with the web examples  
> (Chap 2 step 6) so I decided to try the 'Advanced Debugging Topics).
> I found I couldn't get Wing to halt at any of the breakpoints.
> To simplify the situation I've added the wingdbstub.py code to the the 
> small test program - cgi101.py (see attached listings)
> I've added the logging feature in 'wingdbstub.py' and the output is 
> shown on the browser print.
> I've set 'Enable passive listen' and the debug status indicator is set 
> to listen on  port '50005'.
> The code is being obeyed - processing changes can be made and the 
> logging is carried out- but Wing does not stop at the breakpoints.
> It's probably something stupid but I can't see it.

When you start the CGI script, does the bug icon in the lower left of 
the IDE window change color?  Mousing over it should show the detailed 
status, indicating that the debug process is connected (and the toolbar 
should also change).

I don't see any breakpoints loaded into the debug process and it's 
trying to look for an IDE_initiated attach request (which you shouldn't 
need to do) so I think it may never be connecting to the IDE.

A common mistake here is failure to copy over the wingdebugpw file -- 
this matters if the http server running the CGI is not running as the 
same user as the IDE.  This is step 2 in the following:


Please let me know if this does not help.



Stephan Deibel
Wingware | Python IDE
Advancing Software Development


More information about the wingide-users mailing list