On Tue, 20 Jun 2000 09:46:34 -0500
"Phillip J. Eby" <[EMAIL PROTECTED]> wrote:


> >Thank you, Phillip. I've spent all the evening hunting these bugs.
> >By the way, how do you debug? Is there better way than inserting things
> >like
> >
> >     print "objectChanging %s, has status=%d" % (
> >         self, self.__dict__.has_key('_v_status_')
> >         )
> >
> I haven't found one yet.  I'm actually using zLOG.LOG calls, however, to a
> logfile, so I can look back at things easily (and because I didn't realize
> you could use print until you posted this...  :) ).

I recommend pdb; there's a How-To klm wrote on the zope.org site called
'Debugging Zope Python Code', that recommends inserting something like

import pdb

at the part of the code that you want to have it drop down into the
debugger at, and then you can step through and find out the value of
various expressions as you're running things, call functions, etc.

Mr. Creosote is also my favorite - check out the MrCreosote subdirectory
of pcgi/ in your Zope installation; the nice thing about Mr. Creosote is
you can have it send debugging info to another machine (UDP packets)

--Brian Hooper

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to