Search code examples
node.jsmacosnpmosx-yosemitenode-inspector

node inspector -brk not working


I am trying to use node-inspector with a simple script. I have some console logs in place so I can tell if it's running or not. I have tried 2 ways:

  1. node-debug test.js

With this approach, the debugger opens in chrome, but does not break and runs without giving me a chance to enter break points.

  1. In terminal window #1:

    ~ $ node-inspector Node Inspector v0.9.2 Visit http://127.0.0.1:8080/debug?port=5858 to start debugging.

    Open debugger in chrome. In terminal window #2:

    node --debug-brk test.js

    The script seems to be waiting, but the debugger window I opened has nothing going on, So I refresh the page. As soon as I do, I see my console logs (not breaking).

I'm running OSX Yosemite (10.10.1), Node.js v0.12.0, NPM 2.5.1, and Node-inspector v0.9.2.

Any ideas why this is happening?


Solution

  • This is a known bug when running on Node v0.12 and io.js, see https://github.com/node-inspector/node-inspector/issues/534