我需要在调试Meteor时更改node-inspector
使用的Web端口,但它似乎总是在8080上运行,这是我需要运行Meteor网络应用程序的地方。
我在尝试运行Meteor之前尝试设置NODE_OPTIONS环境变量:
$ export NODE_OPTIONS=--debug=47977
$ meteor debug --port=8080
[[[[[ ~/.../src ]]]]]
=> Started proxy.
=> Started MongoDB.
Starting your app -
Your application is now paused and ready for debugging!
To debug the server process using a graphical debugging interface,
visit this URL in your web browser:
http://localhost:8080/debug?port=5858
Paused at /.../src/.meteor/local/build/main.js:7
Cannot start the server at 0.0.0.0:8080. Error: listen EADDRINUSE.
There is another process already listening at this address.
Run `node-inspector --web-port={port}` to use a different port.
我尝试在另一个网络端口上单独运行node-inspector然后启动meteor,但meteor似乎也总是试图在8080上启动node-inspector:
$ node-inspector --web-port=47977 &
[1] 74439
$ Node Inspector v0.5.0
info - socket.io started
Visit http://127.0.0.1:47977/debug?port=5858 to start debugging.
$ meteor debug --port=8080
[[[[[ ~/.../src ]]]]]
=> Started proxy.
=> Started MongoDB.
Starting your app -
Your application is now paused and ready for debugging!
To debug the server process using a graphical debugging interface,
visit this URL in your web browser:
http://localhost:8080/debug?port=5858
Paused at /.../src/.meteor/local/build/main.js:7
Cannot start the server at 0.0.0.0:8080. Error: listen EADDRINUSE.
There is another process already listening at this address.
Run `node-inspector --web-port={port}` to use a different port.
注意,这里有3个端口:
我需要Meteor在8080上运行,但似乎也无法在8080上停止Meteor启动节点检查器。我还尝试了一些其他端口用于节点检查器,但结果相同。
使用Meteor 1.2.1在Mac上运行
答案 0 :(得分:0)
我有同样的问题,我已经解决了:
终端运行中的 node-inspector --web-port=47977
并在新的终端运行meteor debug
转到http://127.0.0.1:47977/ws=127.0.0.1:47977&port=5858
开始调试。