且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从 Node.js 输出到 Chrome 控制台

更新时间:2023-12-05 13:20:46

注意:由于旧答案(写于 2014 年 9 月)指的是旧版本的 node-inspector,我的说明在 2017 年不再相关.此外,文档已经变得更好,所以我更新了我原来的答案:

NOTE: Since the old answer (written in september 2014) refers to an older version of node-inspector, my instructions are not relevant anymore in 2017. Also, the documentation has gotten a lot better, so I have updated my original answer:

node-inspector 是您所需要的.它会打开一个 Chrome 实例,其中包含用于调试的开发人员工具.

node-inspector is what you need. It opens up an instance of Chrome with its developer tools for debugging.

它也很容易使用:

1.安装

$ npm install -g node-inspector

2.开始

$ node-debug app.js

来源:https://github.com/node-inspector/node-inspector