How to debug when develop on view

#1

Hi,all
I want to do some testing on view. but I might get some error like:
Syntax error in the map function of the view `VIEW_NAME*’: SyntaxError: Unexpected token !
when I edit view by http://{couchbase_server}:8091.
Is there some logs or debug tools or development method for view developing?

#2

Can you paste here your map function?

#3

In fact, I means that this is a common question.I want to know how to develop on view quickly.