You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Aleksei Koziatinskii ade2052ad2 1.1.5 2 years ago
docs Initial commit 3 years ago
front_end fix(frontend): report image file content as base64 2 years ago
lib 1.1.5 2 years ago
scripts fix(build): build should bundle ${app}.js file 2 years ago
services fix(frontend): frontend uses file urls instead of paths 2 years ago
test fix(frontend): minor fixes 3 years ago
utils/testrunner test: add integration tests (#53) 3 years ago
.editorconfig added missing files 3 years ago
.eslintignore test: add integration tests (#53) 3 years ago
.eslintrc.js fix(search): respect folder search exclude regex, collocate fs and search (#184) 3 years ago
.gitignore added missing files 3 years ago
.npmignore chore(npmignore): added *.tgz to avoid publishing packed package 2 years ago
.travis.yml chore(build): added basic travis CI 3 years ago docs( fix formatting of optional (#188) 3 years ago
LICENSE Initial commit 3 years ago feat(profiler): auto stop profiler when app is finished 2 years ago
build.js fix(terminal): fixed terminal for Node 12 and Node 10 2 years ago
debug.js fix(backend): collection of minor fixes (#174) 3 years ago
ndb.js fix(backend): removed settings hacks 3 years ago
package-lock.json 1.1.5 2 years ago
package.json 1.1.5 2 years ago
version.js refactor(backend): inline NDB_VERSION 2 years ago


Build Status NPM ndb package

ndb is an improved debugging experience for Node.js, enabled by Chrome DevTools


Compatibility: ndb requires Node >=8.0.0. It works best with Node >=10.

Installation: ndb depends on Puppeteer which downloads a recent version of Chromium (~170MB Mac, ~280MB Linux, ~280MB Win).

# global install with npm:
npm install -g ndb

# alternatively, with yarn:
yarn global add ndb

Global installation may fail with different permission errors, you can find help in this thread.

Windows users: Installation may fail on Windows during compilation the native dependencies. The following command may help: npm install -g windows-build-tools

Local install

If you want ndb available from an npm script (eg. npm run debug runs ndb index.js), you can install it as a development dependency:

# local install with npm:
npm install --save-dev ndb

# alternatively, with yarn:
yarn add ndb --dev

You can then set up an npm script. In this case, ndb will not be available in your system path.

Getting Started

You can start debugging your Node.js application using one of the following ways:

  • Use ndb instead of the node command
ndb server.js

# Alternatively, you can prepend `ndb`
ndb node server.js
  • Prepend ndb in front of any other binary
# If you use some other binary, just prepend `ndb`
## npm run unit
ndb npm run unit

# Debug any globally installed package
## mocha
ndb mocha

# To use a local binary, use `npx` and prepend before it
ndb npx mocha
  • Launch ndb as a standalone application
    • Then, debug any npm script from your package.json, e.g. unit tests
# cd to your project folder (with a package.json)
ndb .
# In Sources panel > "NPM Scripts" sidebar, click the selected "Run" button 
  • Use Ctrl/Cmd + R to restart last run

  • Run any node command from within ndb's integrated terminal and ndb will connect automatically

  • Run any open script source by using 'Run this script' context menu item, ndb will connect automatically as well

  • Use --prof flag to profile your app, Ctrl/Cmd + R restarts profiling

ndb --prof npm run unit

What can I do?

ndb has some powerful features exclusively for Node.js:

  1. Child processes are detected and attached to.
  2. You can place breakpoints before the modules are required.
  3. You can edit your files within the UI. On Ctrl-S/Cmd-S, DevTools will save the changes to disk.
  4. By default, ndb blackboxes all scripts outside current working directory to improve focus. This includes node internal libraries (like _stream_wrap.js, async_hooks.js, fs.js) This behaviour may be changed by "Blackbox anything outside working dir" setting.

In addition, you can use all the DevTools functionality that you've used in typical Node debugging:

  • breakpoint debugging, async stacks (AKA long stack traces), async stepping, etc...
  • console (top-level await, object inspection, advanced filtering)
  • eager evaluation in console (requires Node >= 10)
  • JS sampling profiler
  • memory profiler




Check out contributing guide to get an overview of ndb development.

Thanks to the 'OG' ndb

In early 2011, @smtlaissezfaire released the first serious debugger for Node.js, under the ndb package name. It's still preserved at We thank Scott for generously donating the package name.