node debugger

#

ref : https://nodejs.org/api/debugger.html

1
2
3
4
5
6
7
// start script
node inspect server.js
// will break at the first 3 lines, print c or cont
cont
// will pause at 'debugger', print repl
repl
// you can print the variables in repl line
1
2
3
4
5
cont, c - Continue execution
next, n - Step next
step, s - Step in
out, o - Step out
pause - Pause running code (like pause button in Developer Tools)