[CPS-devel] PDBDebugMode : post mortem debugging with Zope

Georges Racinet gracinet at nuxeo.com
Mon Mar 13 19:16:28 CET 2006


On Mar 12, 2006, at 11:49 PM, Olivier Grisel wrote:

> Hi list,
>
> Just to point a new useful tool:
>
> http://www.zope.org/Members/rossp/PDBDebugMode/PDBDebugMode
>
> Usage:
>
>  - drop the product on your dev instance
>  - start Zope in 'debug-mode on with runzope in shell
>  - trigger a exception with a browser
>  - go back to the shell and debug with pdb

After using it today, I must say that this is insanely great,  
especially because it works for parts of Zope code where noone sane  
would put a pdb tracepoint. Namely,  always be cursing zpt macros for  
making the current namespace impractical to trace ? I just got this:

 > /usr/local/zope29/lib/python/Products/PageTemplates/Expressions.py 
(323)restrictedTraverse()
-> raise
(Pdb) u
 > /usr/local/zope29/lib/python/Products/PageTemplates/Expressions.py 
(127)_eval()
-> ob = restrictedTraverse(ob, path, getSecurityManager())
(Pdb) ob
{'identite': 'CPS Manager', 'label_id': 'label_0,user_wdata:manager',  
'input_id': '0,user_wdata:manager', 'id_without_prefix': 'manager',  
'id': 'user_wdata:manager', 'id_for_role_settings': 'manager'}
(Pdb) path
['deletable']

Of course, the same works for TALES expressions à la 'row/cell/ 
widget_rendered'.

---------
Georges Racinet                        Nuxeo SAS
gracinet at nuxeo.com                http://nuxeo.com
Tel: +33 (0) 1 40 33 71 73




More information about the cps-devel mailing list
More information about CPS: CPS project - CVS - API

Hosting: Nuxeo: Zope service provider


This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.