Debugging Your NodeJS Application

suggest change

Node.js includes an inspector that works with Chrome DevTools and compatible editors. Start a program under the inspector with:

node --inspect-brk your-script.js

Use --inspect instead when the program should start immediately. Add a debugger statement where execution should pause:

function calculate(value) {
    debugger;
    return value * 2;
}

Open chrome://inspect in Chrome and select the Node.js process, or attach with your editor's Node.js debugger.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents