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
[EMAIL PROTECTED] http://nuxeo.com
Tel: +33 (0) 1 40 33 71 73
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel