Re: buildout + debugzope + wsgi
Baiju M <[email protected]>
| Newsgroups | gmane.comp.web.zope.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jan 21, 2010 at 11:47 PM, Adam GROSZER <[email protected]> wrote: > Hello, > > What do we use nowadays instead of the good old debugzope script > with buildout and wsgi (and paster)? > I somehow did not find a recipe for that. Both Grok & BlueBream use zope.app.debug.debug to create a debugger from database. And then create an interactive prompt, like this: db = zope.app.wsgi.config(zope_conf) debugger = Debugger.fromDatabase(db) # Invoke an interactive interpreter shell banner = ("Welcome to the interactive debug prompt.\n" "The 'root' variable contains the ZODB root folder.\n" "The 'app' variable contains the Debugger, 'app.publish(path)' " "simulates a request.") __import__('code').interact(banner=banner, local={'debugger': debugger, 'app': debugger, 'root': debugger.root()}) But, there is slight difference between invoking the prompt in Grok and BlueBream. Grok has "[console_scripts]" entry point to create a custom command and BlueBream use "[paste.global_paster_command]" entry point to create sub-command for "paster". BTW, BlueBream's idea is inspired by Pylons and code is stolen from Grok :) Regards, Baiju M _______________________________________________ Zope-Dev maillist - [email protected] https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )