Question

I've been wondering if there are any hidden / not well known features of couchdb?

We have had to debug map/reduce functions related to views and it is quite a pain to do so (no step by step debugging etc).

We have found links such as How to console log in couchdb but wondering if someone has found any more efficient ways and features.

Was it helpful?

Solution

There is no any of such features for debugging in CouchDB, except Log Driven Debugging approach. However, if you'll not limit yourself by only default CouchDB distribution, you may found useful to make mocked version of query server or interact with him directly like this ruby test case does or even switch to nodejs query server to debug views right in browser - there are many options as you see.

OTHER TIPS

I have some pretty hefty views (1000+ rows of code). As I could not find a decent debugging framework. I stopped debugging in couchdb altogether.

My view docs have a common library view called (_lib). This is accessed form other views in the same doc.).

Initially I used a combination of the Kanape IDE and some emit's that were only triggered if I had set a debug flag.

Now I have moved the complete framework to Webstorm, where I debug using jasmine as well as profile using spy.js. It allowed me to find bottlenecks and have pretty fast views even across databases with a size of around 25 GByte.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top