无法使节点debugging工作

这感觉真的很愚蠢,但我不能让节点检查器/ node-debug工作。

这些指令说要做npm install,然后运行node-debug web.js 所以我做到了。 现在我有一个可爱的浏览器窗口打开,显示了我的断点代码…并且不知道要使用哪个url来访问代码。

检查员在http://localhost:8080/debug?port=5858 ,terminal说:

 > node-debug web.js debugger listening on port 5858 Node Inspector is now available from http://localhost:8080/debug?port=5858 Debugging `web.js` 

我尝试点击localhost:5000 (这是我的express.js端口),但是,如果我没有一个单独的node web.js实例运行失败,或者它成功,如果我有另一个运行,但doesn'不要在检查员的任何一个断点处

当我去http://localhost:5858/ ,我得到:

远程debugging会话已经激活

当我去http://localhost:8080/ ,我得到:

不能获取 /

/path一般在我的服务器上工作。)

默认情况下, node-debug--debug-brk模式启动应用程序。 这会停止您的应用程序在第一行(表示未启动)。

你可以使用node-debug --no-debug-brk查看node-debug --h的更多信息。

哎。 好的,在我发布之前,看了更多的问题。 看起来问题只是我没有在debugging模式下运行原始实例。 没有人告诉我,我必须,所以我只是不知道,否则!

现在有什么对我有用的:

 > node debug web 

然后在不同的terminal

 > node-debug web.js