On Feb 13, 5:43 pm, Ben Bangert <[EMAIL PROTECTED]> wrote:
> On Feb 12, 2008, at 9:05 AM, Ian Bicking wrote:
>
> > This doesn't exist.  If you want to add it, it's in WebError
> > (depending
> > on your Pylons setup you might be using paste.evalexception, but
> > that's
> > being replaced with/extracted to WebError, and the WebError code is
> > easier to read too).  The WebError repository is here:
> >http://knowledgetap.com/hg/weberror/
>
> There's also a /_debug/summary method which returns a JSON array of
> all the currently valid debug URL's for cached exception reports. It
> shouldn't be too hard to make a little AJAX window thats hooked up to
> query that URL and display current debug URL's. My plan was to have a
> special url you can use during development that actually pops up this
> window so that you can easily see and just click on new debug URL's
> rather than copying and pasting them, just haven't gotten to it yet. :)

Awesome idea! I'll probably still put it in weberror when 0.9.7 is
done. Here's a quick bit of HTML which will load the latest debug in
an IFRAME if anyone else wants it (though it will only work on firefox
'cos of the xmlhttprequest).

<html>
    <head>

        <style type="text/css">
            #debug
            {
                width:100%;
                height:100%;
            }
            body
            {
                padding: 0px;
                margin: 0px;
            }
            iframe
            {
                border: 0px solid white;
            }
        </style>
    </head>
    <body>

        <iframe id='debug'></iframe>
        <script>
            function check()
            {
                // get the view ids
                var req = new XMLHttpRequest();
                req.open('GET', '/_debug/summary', false);
                req.send(null);
                if (req.status == 200)
                {
                    var summary = eval(req.responseText);
                    if (summary.length > 0)
                    {
 
document.getElementById('debug').setAttribute('src', summary[0]
['uri']);
                    }
                }
            };
            check();
        </script>
    </body>
</html>



>
> Cheers,
> Ben
>
>  smime.p7s
> 3KDownload

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to