Skip to content

Commit

Permalink
docs: add ndb as a debugging tip (#3195)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanivefraim authored and aslushnikov committed Sep 8, 2018
1 parent 1b2c811 commit 6581ee9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Expand Up @@ -243,6 +243,19 @@ Puppeteer creates its own Chromium user profile which it **cleans up on every ru
# Protocol traffic can be rather noisy. This example filters out all Network domain messages
env DEBUG="puppeteer:*" env DEBUG_COLORS=true node script.js 2>&1 | grep -v '"Network'

6. Debug your Puppeteer (node) code easily, using [ndb](https://github.com/GoogleChromeLabs/ndb)

- `npm install -g ndb` (or even better, use [npx](https://github.com/zkat/npx)!)

- add a `debugger` to your Puppeteer (node) code

- add `ndb` (or `npx ndb`) before your test command. For example:

`ndb jest` or `ndb mocha` (or `npx ndb jest` / `npx ndb mocha`)

- debug your test inside chromium like a boss!


<!-- [END debugging] -->

## Contributing to Puppeteer
Expand Down

0 comments on commit 6581ee9

Please sign in to comment.