I did the recipe z3c.recipe.paster:debug just in case someone needs

Friday, January 22, 2010, 2:18:35 AM, you wrote:

BM> On Thu, Jan 21, 2010 at 11:47 PM, Adam GROSZER <agros...@gmail.com> 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.

BM> Both Grok & BlueBream use zope.app.debug.debug to create
BM> a debugger from database. And then create an interactive prompt,
BM> like this:

BM>        db = zope.app.wsgi.config(zope_conf)
BM>         debugger = Debugger.fromDatabase(db)
BM>         # Invoke an interactive interpreter shell
BM>         banner = ("Welcome to the interactive debug prompt.\n"
BM>                   "The 'root' variable contains the ZODB root folder.\n"
BM>                   "The 'app' variable contains the Debugger,
BM> 'app.publish(path)' "
BM>                   "simulates a request.")
BM>         __import__('code').interact(banner=banner,
BM>                                     local={'debugger': debugger,
BM>                                            'app': debugger,
BM>                                            'root': debugger.root()})

BM> But, there is slight difference between invoking the prompt in Grok
BM> and BlueBream. Grok has "[console_scripts]" entry point to create a
BM> custom command and BlueBream use "[paste.global_paster_command]"
BM> entry point to create sub-command for "paster".
BM> BTW, BlueBream's idea is inspired by Pylons and code is stolen from Grok :)

BM> Regards,
BM> Baiju M

Best regards,
 Adam GROSZER                            mailto:agros...@gmail.com
Quote of the day:
Every journalist has a novel in him, which is an excellent place for it.

Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to