2

如果我输入

node --debug /home/engine/public_html/myapp.js

然后在另一个腻子标签中

node-inspector --webhost http://website.com

我仍然得到它告诉我打开浏览器并在本地查看...

Node Inspector v0.7.0-2
info  - socket.io started
Visit http://127.0.0.1:8080/debug?port=5858 to start debugging.

我的网站是在线的而不是本地的。当我去这个地址时,检查员告诉我 chrome 说

This webpage is not available

我打开了端口 5858 和 8080 我看不出这是如何工作的。

4

1 回答 1

0

当我尝试使用节点检查器调试我的远程站点时,即使我得到了 localhost url。

启动检查器和应用程序后,尝试访问 URL http://website.com/debug?port=port_number 。

以下是步骤:

  1. 启动 Node Inspector 服务器 $ node-inspector --web-port=5050

  2. 在 Node 进程中启用调试模式 $ node --debug=5050 app.js

  3. 加载调试器 UI 在 Chrome 浏览器中打开http://website.com/debug?port=5050 。

于 2014-10-30T05:00:00.707 回答