couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Binns <>
Subject Debugging show/view/list/filter etc code
Date Thu, 10 Dec 2009 05:49:14 GMT
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
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

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.

Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


View raw message