Hi Peter,

Frey, Peter wrote:
When the WingIDE Zope-Product WingDbg is installed (and working),

Does WingDbg ship with its source code?

yes, it does, at least in the professional version
I am not sure about the light one

Any chance I could get you to email me that off-list so I can see about making the two compatible?

If so, I'd be interested to see it to see how the two products are treading on each other...

the WingDbg uses a monkey patch mechanism to hook into debugging Python Scripts
namly it overwrites

    PythonScript.__init__
    PythonScript._compile
    PythonScript.write
    PythonScript.read

and, if FSPythonScript is available, also:

    FSPythonScript._createZODBClone
    FSPythonScript._write

Ah, right, and you'll see that zdb monkey patches:

PythonScript._exec
PythonScript._compiler
FSPythonScript._write

To debug this, what I'd suggest putting:

import pdb; pdb.set_trace()

(NB: that's pdb, NOT zdb)

...somewhere such that you can step through and see which monkeypath methods are getting called. Print statements may also work ;-)

Once we've got that figured out, I can see about getting zdb to work around Wing's stuff, if it's there...

The problem is that I don't use Wing and so can't try this out...

I assume that your product may be more flexible in respect to 
non-filesystem-based PythonScripts
but I have not succeeded testing it as I ran into a AttributeError "Zdb instance has 
no attribute '_wait_for_mainpyfile'"

Ah, now that sounds like another clue. This might well be the problem with Wing, can you give me the full traceback from when you saw this?

(I am now not sure if this was due to the fact that I have the WingDbg 
installed, or if it was because I was attempting to debug
filesystem based product code while Zope was not yet fully initialized, I had to find the cause for a problem with Zope starting in Debug Mode with debug-mode in the config set to off)

This is likely a wing problem...

when I find time and see more clearer why Zope Debugger and WingDbg fail 
together (maybe it was configuration specific ...)
I will let you know and ask Stephan/John from Wingware if the problem is known.

Well, there IS a known problem: the one you're reporting ;-)
Would be good to knock heads wit hthe Wingware guys and see if we can come up with a way to make the products compatible...

WingDbg failes to connect back to the WingIDE client, no error message, the 
client just does not get contacted by the server

Well, when did you see the _wait_for_mainpyfile error?

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to