Prerequisites: Node.js 6.3+, Chrome 55+, nodeamon
- turn on
chrome://flags/#enable-devtools-experiments& relaunch Chrome - open devtools settings > experiments, press
shift6 times (lol, for real) and checknode debuggingbox - open & close devtools
nodemon --watch . --inspect app.js- connect to node in devtools (Sources > Threads (on the right) > Connect next to node)
Debugging tests:
mocha --debug-brk --inspect --grep 'something' path/to/test.js
Or install node inspector manager and use with:
nodemon --watch . --inspect app.js
# or
mocha --debug-brk --inspect path/to/test/js