如何调试Node.js应用程序? [英] How do I debug Node.js applications?
问题描述
如何调试Node.js服务器应用程序?
How do I debug a Node.js server application?
现在我主要使用这种打印语句这样的 alert调试 :
Right now I'm mostly using alert debugging with print statements like this:
sys.puts(sys.inspect(someVariable));
必须有一个更好的调试方法。我知道 Google Chrome 有一个命令行调试器。这个调试器是否可用于Node.js?
There must be a better way to debug. I know that Google Chrome has a command-line debugger. Is this debugger available for Node.js as well?
推荐答案
V8 调试器作为Google的一部分发布 Chrome开发人员工具可用于调试Node.js脚本。在节点中可以找到如何正常工作的详细说明.js GitHub wiki 。
The V8 debugger released as part of the Google Chrome Developer Tools can be used to debug Node.js scripts. A detailed explanation of how this works can be found in the Node.js GitHub wiki.
还有一个 ndb ,一个用Node.js本身编写的命令行调试器。
There is also ndb, a command line debugger written in Node.js itself.
这篇关于如何调试Node.js应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!