1.全局安装node-inspector:
npm install -g node-inspector --unsafe-perm
2.测试是否安装成功:
node-inspector
3.启动app
node --debug xx.js
node --debug -brk xx.js (启动应用并停在第一行)
4.启动inspector:
node-inspector
5.chrome浏览器输入
http://127.0.0.1:8080/debug?port=5858