# pouchdb-debug

> PouchDB.debug() API to debug PouchDB operations

Latest version **7.2.1** (published 2020-02-16) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install pouchdb-debug
pnpm add pouchdb-debug
yarn add pouchdb-debug
bun add pouchdb-debug
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: esm support; no vulnerabilities; high maintenance score; popular repo.

Warnings: low downloads; no types.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 7.2.1 |
| Published | 2020-02-16 |
| First published | 2017-04-20 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17603 |
| Author | Dale Harvey |
| Maintainers | daleharvey, garrensmith, nolanlawson, willholley |

## Links

- npm: https://www.npmjs.com/package/pouchdb-debug
- Repository: https://github.com/pouchdb/pouchdb
- Homepage: https://github.com/pouchdb/pouchdb#readme
- Issues: https://github.com/pouchdb/pouchdb/issues
- npm.io page: https://npm.io/package/pouchdb-debug

## Dependencies (1)

- [debug](https://npm.io/package/debug.md) 3.1.0

## Recent versions

- 7.2.1 (latest) — 2020-02-16
- 7.1.1 — 2019-06-14
- 7.1.0 — 2019-06-13
- 7.0.0 — 2018-06-21
- 6.4.3 — 2018-02-02
- 6.4.2 — 2018-01-24
- 6.4.1 — 2017-12-18
- 6.4.0 — 2017-12-17
- 6.3.4 — 2017-07-15
- 6.3.3 — 2017-07-14
- 6.3.2 — 2017-07-13
- 6.2.0 — 2017-04-20
- 0.0.0 — 2017-04-20

## README

pouchdb-debug
======

`PouchDB.debug()` API as a standalone module. Provides direct access to [debug](https://github.com/visionmedia/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._**

### Usage

```bash
npm install pouchdb-debug
```

Then attach it to `PouchDB`:

```js
var pouchdbDebug = require('pouchdb-debug');
PouchDB.plugin(pouchdbDebug);
```

To enable debug mode, just call:

```js
PouchDB.debug.enable('*');
```

Then look in your browser console.

In Node.js, you can also set a command-line flag:

```js
DEBUG=pouchdb:* node myscript.js
```

You can also enable debugging of specific modules. Currently we only have `pouchb:api` (API-level calls) and `pouchdb:http`  (HTTP requests):

```js
PouchDB.debug.enable('pouchdb:api'); // or
PouchDB.debug.enable('pouchdb:http');
```

These settings are saved to the browser's LocalStorage. So to disable them, you must call:

```js
PouchDB.debug.disable();
```

Your users won't see debug output unless you explicitly call `PouchDB.debug.enable()` within your application code.

For full API documentation and guides on PouchDB, see [PouchDB.com](http://pouchdb.com/). For details on PouchDB sub-packages, see the [Custom Builds documentation](http://pouchdb.com/custom.html).

### Source

PouchDB and its sub-packages are distributed as a [monorepo](https://github.com/babel/babel/blob/master/doc/design/monorepo.md).

For a full list of packages, see [the GitHub source](https://github.com/pouchdb/pouchdb/tree/master/packages).

---
_Source: https://npm.io/package/pouchdb-debug · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
