[英]Node.js remote debug doesn't work
When I start my node application as node --debug . -c=config-name
当我以
node --debug . -c=config-name
身份启动节点应用程序时node --debug . -c=config-name
node --debug . -c=config-name
option there no any message about listening any port. node --debug . -c=config-name
选项没有关于监听任何端口的任何消息。
Also if I run netstat -tlnp
I can't see any application listening port 5858. 另外,如果我运行
netstat -tlnp
,则看不到任何应用程序侦听端口5858。
By this reason I can't use any debugger such as node-inspector or intellij Idea node plugin. 因此,我不能使用任何调试器,例如node-inspector或intellij Idea节点插件。
Any ideas how I can resolve it? 有什么想法可以解决吗?
Ohh I got it! 哦,我明白了!
--debug
should be entered BEFORE path to executable. --debug
应该在可执行文件的路径之前输入。
For example vagrant@precise64:~$ node chat.js --debug
doesn't work. 例如
vagrant@precise64:~$ node chat.js --debug
不起作用。
But in this case it works: 但是在这种情况下,它可以工作:
vagrant@precise64:~$ node --debug chat.js
debugger listening on port 5858`
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.