Debug Node.js with Chrome DevTools
Prerequisites
- Node.js 6.3+;
- Chrome 55+;
Configure Chrome (Latest versions no longer need this step);
Enter URL: chrome://flags/#enable-devtools-experiments to enter Developer Lab
Enable highlighted option
Restart Chrome
Open DevTools Setting -> Experiments;
Press Shift 6 times consecutively to show hidden options
Find Node debugging and check it. (New versions no longer have this option, it’s enabled by default. So Chrome doesn’t need configuration)

Run Node.js
Just add –inspect to the command, followed by the file you want to execute;
node --inspect app.js

Copy the console output:
chrome-devtools:// protocol address
chrome-devtools://devtools/remote/serve_file/xxxxxxxxx
Paste it into the browser address bar, and you can use Chrome’s console to debug your node application.