How can one best debug N1QL queries

In Mssql there is tools which allow me to debug or at least monitor what query was send to the server. This is specially helpful when sending the query from an app like nodeJS and something goes wrong like the value passes is string vs numeric etc. while using a template with $ place holders. Is there anywhere on server or so where I can see the full query with populated values to troubleshoot issues ?


Also Checkout Chapters of

  1. Optimize N1QL Performance Using Request Profiling
  2. Query Performance Monitoring Made Easy With Couchbase N1QL