ndb alternatives and similar modules
Based on the "Debugging / Profiling" category.
Alternatively, view ndb alternatives based on common mentions on social networks and blogs.
5.2 1.6 ndb VS llnodePost-mortem analysis tool which allows you to inspect objects and get insights from a crashed Node.js process.
4.8 3.9 ndb VS swagger-statsTrace API calls and monitor API performance, health, and usage metrics.
2.4 0.0 ndb VS thetoolCapture different CPU, memory, and other profiles for your app in Chrome DevTools friendly format.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of ndb or a related project?
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
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.
You can start debugging your Node.js application using one of the following ways:
ndbinstead of the
ndb server.js # Alternatively, you can prepend `ndb` ndb node server.js
ndbin 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
ndbas a standalone application
- Then, debug any npm script from your
package.json, e.g. unit tests
- Then, debug any npm script from your
# cd to your project folder (with a package.json) ndb . # In Sources panel > "NPM Scripts" sidebar, click the selected "Run" button
Rto 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
--profflag to profile your app,
ndb --prof npm run unit
What can I do?
ndb has some powerful features exclusively for Node.js:
- Child processes are detected and attached to.
- You can place breakpoints before the modules are required.
- You can edit your files within the UI. On Ctrl-S/Cmd-S, DevTools will save the changes to disk.
- By default, ndb blackboxes all scripts outside current working directory to improve focus. This includes node internal libraries (like
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'
In early 2011, @smtlaissezfaire released the first serious debugger for Node.js, under the
ndb package name. It's still preserved at github.com/smtlaissezfaire/ndb. We thank Scott for generously donating the package name.