[Zope-dev] Re: PDBDebugMode 0.1 Release

Paul Winkler pw_lists at slinkp.com
Tue Mar 14 15:12:53 EST 2006


On Tue, Mar 14, 2006 at 12:56:33PM -0500, Tres Seaver wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Ross Patterson wrote:
> > http://www.zope.org/Members/rossp/PDBDebugMode
> > 
> > PDBDebugMode - PDB post-mortem debugging on exceptions when debug-mode=on
(snip)
> Way cool!  What would you think about incorporating a version of this
> into the Zope2 core for version 2.10?  I think we would need to add some
> additional ZConfig schema to support it, as the mere presence of the
> product would not be sufficient as an enabling knob (in fact, there
> mightn't be any "product" at all).
> 
> If you're willing, I'd be glad to help land it (I think Z3 already has a
> similar feature, wired in as a separate server).

I've only just tried PDBDebugMode, very handy since you don't have
to put set_trace() in your code (and remember to remove it).

I have also sometimes used Chris Withers' "zdb" product, 
http://www.simplistix.co.uk/software/zope/zdb,
which has some overlap in that it allows you to do this in restricted
code, e.g. cmf scripts:

from Products.zdb import set_trace
set_trace()

... and, very usefully, once in the debugger you can use the "l" command
to see the script source and it gets line numbers right.  So Ross, maybe
you can borrow some of Chris' code :-)

Unfortunately zdb doesn't appear to work with zope 2.9 / python 2.4.
I'll file a bug report with Chris.
It works great with zope 2.8 / python 2.3.

-- 

Paul Winkler
http://www.slinkp.com


More information about the Zope-Dev mailing list