NodeJS - NodeJS的逐步调试器 [英] NodeJS - a step-by-step debugger for NodeJS

查看:153
本文介绍了NodeJS - NodeJS的逐步调试器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找有效的方法来逐步调试NodeJS服务器代码。在这一刻,我使用了几十个console.log(),这是非常困难的。完美的工具是允许我检查堆栈中每个变量的值,并逐行跟踪我的程序。首选OS = MacOS / Linux。可以吗?

I'm looking for effective way for step-by-step debugging NodeJS server code. At this moment I use dozens of console.log()'s and it's extremely hard. The perfect tool is one that would allow me to check the values of every variable in stack and trace my program line by line. Prefered OS = MacOS/Linux. Is it possible?

推荐答案

这个怎么样?

尝试测试Nodeclipse版本0.2.0 Beta。

You can try to test for Nodeclipse version 0.2.0 beta.

http://www.tomotaro1065.com/nodeclipse/

它将帮助您轻松调试节点应用程序。

It will help you to debug node apps easily.


生成EXPRESS PROJECT

GENERATING OF EXPRESS PROJECT

Select the [File]-[New]-[Project] menu.
Select [Node]-[Express Project], and push [Next] button.
Enter [Project name], and push [Finish] button.

DEBUGGING

DEBUGGING

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.


这篇关于NodeJS - NodeJS的逐步调试器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆