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.

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.")
                                    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 :)

Baiju M
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