couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Dionne <>
Subject Re: Debugging show/view/list/filter etc code
Date Thu, 10 Dec 2009 10:40:34 GMT

On Dec 10, 2009, at 12:49 AM, Roger Binns wrote:

> Hash: SHA1
> Trying to debug this code (Javascript) is a royal pain.  It is like being
> back in the dark ages adding log() statements.  I have resorted to running
> my code separately directly under the 'js' interpreter but it isn't quite
> the same environment. (Sometimes you can even get tracebacks.  But you are
> out of luck if you have an exception while handling an exception!) The wiki
> is despairing for views and the situation is no better for
> shows/lists/filters etc.
> Anyway I think it is relatively easy to make nice interactive debugging

All the power to you if you really think this is easy. It would certainly add a lot of value.

> possible as a feature of futon maybe with some server side help.  My guess
> is that you require Firebug in the client browser and then feed it a page of
> Javascript that emulates the server environment.  It would contain the
> defined show/view/list/filter and just enough glue to work (eg fetch the
> appropriate docs from the server, make emit and log send messages to Firebug
> console).  Then you just use the regular debugging functionality builtin to
> Firebug.
> It is also possible to extend this environment to help with compliance and
> testing.  For example it can emulate rereduce for views, shows with null
> docs etc.
> Roger
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -
> iEYEARECAAYFAksgi9kACgkQmOOfHg372QT11QCbBZ8g7j/trfCoo52AFEiY0gY5
> Wd8AoKinzQV8LC9izLlNyE6sy8fgYmTd
> =R+Eg

View raw message