node package manager
Don’t reinvent the wheel. Reuse code within your team. Create a free org »


Delay Debug

It starts node-inspector for you, and it does so until your app is running. It uses node-inspector as a dependency to inspect your app


  • Node inspector is a bit slow to start, and sometimes it is to complicated to be thinking of how to activate it when using tools like nodemon.
  • This provides a default configuration for nodeinspector with preload disabled for faster start
  • Not having to wait for node inspector in order to start your app allows you to restart the app with frequency (like nodemon reloading after a change), yet you will still be able to add breakpoints as needed if things start acting funky on your app


npm install delay-debug


On your main app file (index.js)

// Your code. E.g. Like starting an http server or a service
  .createServer(function(req, res){'Request received: ' + req.url);
    res.end('It Works!! Path Hit: ' + req.url);
  .listen(8080, function(){ console.log("Server listening on: http://localhost:%s", 8080); })
// Start the inspector until now
var inspector = require('delay-debug');

From the command line start your app, make sure to include --delaydebug flag

node index.js --delaydebug

Follow the instructions on the output. Sometimes you might need to use the pause button on the debugger and then continue in order to allow the server process to continue


You can pass a different configurations for nodeinspector by providing an object

var inspector = require('delay-debug');
  delaydebug: {} // Normally what would go in a .node-inspectorrc

Pairs well with conf-stack project

  inspector  = require('delay-debug');
  ,confStack = require('conf-stack')
  ,config    = confStack()