Skip to content
ndb is an improved debugging experience for Node.js, enabled by Chrome DevTools
JavaScript CSS HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Initial commit Jul 20, 2018
front_end fix(frontend): report image file content as base64 Jul 16, 2019
lib 1.1.5 Sep 12, 2019
scripts fix(build): build should bundle ${app}.js file Jun 20, 2019
services fix(frontend): frontend uses file urls instead of paths Jul 16, 2019
utils/testrunner test: add integration tests (#53) Jul 25, 2018
.eslintignore test: add integration tests (#53) Jul 25, 2018
.eslintrc.js feat(rpc): migrate to carlo.loadParams(). (#187) Nov 23, 2018
.gitignore added missing files Jul 20, 2018
.npmignore chore(npmignore): added *.tgz to avoid publishing packed package Jun 27, 2019
.travis.yml chore(build): added basic travis CI May 31, 2019 docs( fix formatting of optional (#188) Nov 25, 2018
LICENSE Initial commit Jul 20, 2018 feat(profiler): auto stop profiler when app is finished Jun 22, 2019
build.js fix(terminal): fixed terminal for Node 12 and Node 10 Jun 20, 2019
debug.js fix(backend): collection of minor fixes (#174) Nov 19, 2018
ndb.js fix(backend): removed settings hacks Dec 2, 2018
package-lock.json 1.1.5 Sep 12, 2019
version.js refactor(backend): inline NDB_VERSION Jul 9, 2019


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.

You can’t perform that action at this time.