The easiest way to debug an application on Node.js is through Node-Inspector. You can use it from any browser supporting WebSockets. It helps multiple ways of debugging like a profiler, livecoding, breakpoints, etc. Here's how to use node-inspector:

  • Install it using npm install -g node-inspector
  • Now, run node-debug app.js
BY Best Interview Question ON 25 Jun 2020