[wingide-users] Problems with debug server solved

gary.h.merrill at gsk.com gary.h.merrill at gsk.com
Wed Jun 23 09:32:03 EDT 2004

The recent problems I've been having with debugging spawned processes and 
with the debug server going of in the weeds have turned out (luckily) to 
be my own fault (coupled to some degree with what I would argue could be 
some improved documentation).

In the first case, I wasn't being careful about where I was putting the 
'import wingdbstub' statement.  Previously, I had been using a file that 
was *never* itself imported but was only spawned from some other file. But 
in the new case I was using a file that was *both* imported elsewhere and 
was spawned from another file.  In both situations I had simply put the 
'import wingdbstub' at the top of the file along with all the other 
imports.  In the first case this worked, but in the second case it didn't 
(since the import was done when that file was *imported* rather than 
*executed*).  Moving the import to the 'if __name__ == "__main__":' 
context solved the problem completely.

While the documentation on this is perfectly accurate, I think that the 
phrase 'At the point where you want debugging to begin ...' is somewhat 
open to the wrong interpretation (largely through lack of thorough 
thought, I'll admit).  Expanding this description a bit, perhaps with one 
or two brief code fragment examples would be an improvement.

In the second case more recently where I was getting the error about the 
debug server not responding, this was caused by my failure to comment out 
the 'import wingdbstub' statement when running the application normally 
under the debugger.

Gary H. Merrill
Director and Principal Scientist, New Applications
Data Exploration Sciences
GlaxoSmithKline Inc.
(919) 483-8456
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20040623/ac6d08e5/attachment.htm

More information about the wingide-users mailing list