nodejs Eclipse调试器:如何指定参数? [英] nodejs Eclipse debugger: how to specify arguments?

查看:137
本文介绍了nodejs Eclipse调试器:如何指定参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用参数的规范启动Eclipse nodejs调试器。
从commmand行启动nodejs应用程序如下完成:

I need to launch the Eclipse nodejs debugger with the specification of an argument. Launching the nodejs application from the commmand line is done as follows:

node myApp.js argumentValue

然后可以通过以下方式在应用程序内访问该参数的值:

The value of the argument is then accessible inside the app by using the following:

process.argv[1]

我不知道如何通过Eclipse调试器启动应用程序时添加参数值。

I don't know how to add the argument value when launching the application through Eclipse debugger.

推荐答案

我发现解决方案是我的nodejs应用程序调试配置的修改。
在Eclipse中,从菜单中选择运行>调试配置,然后在节点应用程序块下选择应用程序脚本,您应该看到:

I found the solution to be the modification of my nodejs app debug configuration. In Eclipse choose from the menu Run>Debug Configurations then choose the application script under the Node Application block, you should see:

现在选择参数选项卡:

插入参数的值,然后按应用。

Insert the value of the argument and press Apply.

这篇关于nodejs Eclipse调试器:如何指定参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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