Gol*_*den 10
基本上,Node.js是建立在V8之上的,因此它的调试功能也建立在V8的调试功能之上.
V8有一个包含的调试器,可以通过端口5858上的TCP访问.
所以基本上你需要的是一个能够连接到端口5858并讨论V8调试协议的前端.
一种选择是使用node-inspector,它基本上在浏览器中提供调试UI.不幸的是,它只适用于谷歌Chrome和Apple Safari(对我来说没有问题,但可能还有其他人;-)).
另一个选择是使用Eclipse的插件.
而且,最后但并非最不重要的是,Node.js的内置调试器(它总是让我想起MS-DOS edlin)也只是这个TCP调试器的前端,只是一个内置的调试器.
当然,还有更多选择......这三个只是前三个我想到的;-)
小智 3
这个怎么样?
您可以尝试测试Nodeclipse 0.2.0 beta版。
http://www.tomotaro1065.com/nodeclipse/
它将帮助您轻松调试节点应用程序。
生成 Express 项目
Run Code Online (Sandbox Code Playgroud)Select the [File]-[New]-[Project] menu. Select [Node]-[Express Project], and push [Next] button. Enter [Project name], and push [Finish] button.调试
Run Code Online (Sandbox Code Playgroud)Open the JavaScript source files that you want to set breakpoints. Double-click on the ruler at the left end of the line you want to set a breakpoint. If you want to remove a breakpoint, double-click on the ruler again. Select the main source file of Node Application on the Project Explorer, open the context menu by right-clicking, select the [Debug As]-[Node Application] menu.
| 归档时间: |
|
| 查看次数: |
4753 次 |
| 最近记录: |