nodejs Eclipse debugger: how to specify arguments?

左心房为你撑大大i 提交于 2019-11-28 11:34:31

问题


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]

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


回答1:


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:

Now select the Arguments tab:

Insert the value of the argument and press Apply.



来源:https://stackoverflow.com/questions/26882928/nodejs-eclipse-debugger-how-to-specify-arguments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!