GoogleChromeLabs / Ndb

Licence: apache-2.0
ndb is an improved debugging experience for Node.js, enabled by Chrome DevTools

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to Ndb

netlogs
Web extension for debugging your API
Stars: ✭ 16 (-99.85%)
Mutual labels:  debugging, devtools
Nim
Streamline Your Node.js Debugging Workflow with Chromium (Chrome, Edge, More) DevTools.
Stars: ✭ 168 (-98.41%)
Mutual labels:  debugging, devtools
Augury
Angular Debugging and Visualization Tools
Stars: ✭ 2,050 (-80.63%)
Mutual labels:  debugging, devtools
clockwork-firefox
Clockwork - php dev tools integrated to your browser - Firefox add-on
Stars: ✭ 22 (-99.79%)
Mutual labels:  debugging, devtools
devtools-tips
A collection of useful cross-browser DevTools tips
Stars: ✭ 81 (-99.23%)
Mutual labels:  debugging, devtools
Clockwork
Clockwork - php dev tools in your browser - server-side component
Stars: ✭ 4,076 (-61.48%)
Mutual labels:  debugging, devtools
InAppDevTools
Android library with a collection of tools for debugging, inspecting and reporting from within your own app
Stars: ✭ 26 (-99.75%)
Mutual labels:  debugging, devtools
Clockwork Chrome
Clockwork - php dev tools integrated to your browser - Chrome extension
Stars: ✭ 415 (-96.08%)
Mutual labels:  debugging, devtools
Scala Trace Debug
Macro based print debugging. Locates log statements in your IDE.
Stars: ✭ 110 (-98.96%)
Mutual labels:  debugging
Frodo
Android Library for Logging RxJava Observables and Subscribers.
Stars: ✭ 1,496 (-85.86%)
Mutual labels:  debugging
Httpcat
httpcat is a simple utility for constructing raw HTTP requests on the command line.
Stars: ✭ 109 (-98.97%)
Mutual labels:  debugging
Flutter Debugger
Stars: ✭ 112 (-98.94%)
Mutual labels:  devtools
Marionette
Selenium alternative for Crystal. Browser manipulation without the Java overhead.
Stars: ✭ 119 (-98.88%)
Mutual labels:  devtools
Httptoolkit Android
Automatic Android interception & debugging with HTTP Toolkit, for Android
Stars: ✭ 107 (-98.99%)
Mutual labels:  debugging
Blender Debugger For Vscode
Blender addon for remote debugging Blender with VS Code (and Visual Studio)
Stars: ✭ 123 (-98.84%)
Mutual labels:  debugging
Parrot
✨ Scenario-based HTTP mocking
Stars: ✭ 109 (-98.97%)
Mutual labels:  devtools
Sniffer
Networking activity logger for Swift
Stars: ✭ 108 (-98.98%)
Mutual labels:  debugging
Service Worker Detector
This extension detects if a website registers a Service Worker.
Stars: ✭ 124 (-98.83%)
Mutual labels:  devtools
Network Plus
DevTools for network recording, modification and resending.
Stars: ✭ 122 (-98.85%)
Mutual labels:  devtools
Lastbackend
System for containerized apps management. From build to scaling.
Stars: ✭ 1,536 (-85.48%)
Mutual labels:  devtools

ndb

Build Status NPM ndb package

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

Installation

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

Screenshot

image

Contributing

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 github.com/smtlaissezfaire/ndb. We thank Scott for generously donating the package name.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].