node --inspect-brk script.js

Category: Node.js & npm/yarn

node --inspect-brk script.js

Start with debugger attached and pause at the very first line before any user code runs

Same as --inspect but pauses at the very first line of code. Gives you time to attach DevTools before any code runs.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.