PouchDB.debug() API as a standalone module. Provides direct access to debug which can be used for debugging PouchDB's internal operations.
This module is currently part of PouchDB core; you don't need to do anything to use it. However, in PouchDB v7.0.0 the
debug() API will be moved to a separate plugin.
npm install pouchdb-debug
Then attach it to
var pouchdbDebug = ;PouchDB;
To enable debug mode, just call:
Then look in your browser console.
In Node.js, you can also set a command-line flag:
DEBUG=pouchdb:* node myscriptjs
You can also enable debugging of specific modules. Currently we only have
pouchb:api (API-level calls) and
pouchdb:http (HTTP requests):
PouchDBdebug; // orPouchDBdebug;
These settings are saved to the browser's LocalStorage. So to disable them, you must call:
Your users won't see debug output unless you explicitly call
PouchDB.debug.enable() within your application code.
PouchDB and its sub-packages are distributed as a monorepo.
For a full list of packages, see the GitHub source.