Debugging Your NodeJS Application
suggest changeNode.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.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents