nodejs的调试器node-inspector

来源:互联网 发布:软件协会网站 编辑:程序博客网 时间:2024/05/21 09:56
1.npm install -g node-inspector     安装node-inspector(-g表示是全局模块)
2.node --debug-brk=5858 xxx.js      xxx是所要调试的文件名,连接除错的脚本调试服务器
3.重新打开一个终端,然后输入 node-inspector 启动node-inspector 

4.在浏览器中打开 http://127.0.0.1:8080/debug?port=5858 即可显示出web调试工具


<nodejs开发指南笔记>