如何调试Node.js

Debugging Node.js with Chrome DevTools

https://nodejs.org/en/docs/guides/debugging-getting-started/

1.

PS C:\Users\clu\Documents\NodeApp\Test> node --inspect .\app.js
Debugger listening on ws://127.0.0.1:9229/34c03922-857b-4e6d-82cf-30dbf27a76ff
For help, see: https://nodejs.org/en/docs/inspector
Server running at http://127.0.0.1:3000/

2.在Chrome浏览器中打开about:inspect

如何调试Node.js

3.打开 Click the Open dedicated DevTools for Node link.

如何调试Node.js

在vs2017中调试

https://github.com/Microsoft/nodejstools/wiki/Debugging

创建Node.js项目,https://github.com/Microsoft/nodejstools/wiki/Projects

debug设置,https://github.com/Microsoft/nodejstools/wiki/Debugging#debugging-options

Developer Tools in Chrome(Chrome Extension)

https://chrome.google.com/webstore/detail/nodejs-v8-inspector-manag/gnhhdgbaldcilmgcpfddgdbkhjohddkj

上一篇:海量小文件存储与Ceph实践


下一篇:swift基础--运算符