- Add a 'debugger' statement in your function
- Call the function manually
- At the terminal, run 'node inspect index.js'
- To continue execution of the file, press 'c' ('continue') then 'enter'
- To launch a 'repl' session, type 'repl' then 'enter'
- To exit the 'repl', press Ctrl + C
Credit to Stephen Grider