node --inspect script.js

Category: Node.js & npm/yarn

node --inspect script.js

Start a Node.js script with the Chrome DevTools debugger attached for step-through debugging

Starts the script with Chrome DevTools debugging enabled. Open chrome://inspect in Chrome to connect and use breakpoints, watch variables, and step through code.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.