Run a script with inspect mode, then press n to go to each next line (how to go straight to a debugger statement instead?) Then type repl to actually access the variables.
node inspect my_program.js
h/t: https://www.youtube.com/watch?v=vW0pmFYWmCU
see: https://nodejs.org/api/inspector.html