What does the Node.js `--nolazy` flag mean?

born2net picture born2net · Feb 3, 2014 · Viewed 14.8k times · Source

When I use --nolazy, I can finally debug asynchronously with IntelliJ, as breakpoints stop at the correct place. But I can't find any docs on --nolazy...

What does --nolazy mean?

Answer

born2net picture born2net · Feb 4, 2014

To let anyone know, if you debug node js (especially remote debug) and use async type coding which you kind of have to as this is the nature of node, you will to run node with the flag of -nolazy

node --nolazy --debug-brk sample1.js

this will force V8 engine to do full compile of code and thus work properly with IntelliJ and WebStorm so you can properly place breakpoints in the code and not have to use the ;debugger; string which v8 looks for...

hope this helps someone, sure helped me :)

Sean.