Reputation: 7651
I am familiar with using the --inspect
option since node 7 or something. Now on node 8, it's just not working. Today I asked node to use the inspector, as usual:
$ node --inspect --debug-brk node_modules/mocha/bin/_mocha o/**/*.test.js
It responds with this:
Debugger listening on ws://127.0.0.1:9229/97a6264d-a751-4467-ac36-172ff3ebaac1
For help see https://nodejs.org/en/docs/inspector
If I try to open that link, Chrome says:
This site can’t be reached
The webpage at ws://127.0.0.1:9229/97a6264d-a751-4467-ac36-172ff3ebaac1 might be temporarily down or it may have moved permanently to a new web address.
ERR_DISALLOWED_URL_SCHEME
Before it used to be a "chrome-devtools://" link, which worked splendidly.
What gives?
Searching around, I can't find anything I'm supposed to do with this ws://
link.
Upvotes: 17
Views: 10023
Reputation: 5519
There is information from nodejs docs
Option 1: Open
chrome://inspect
in a Chromium-based browser. Click the Configure button and ensure your target host and port are listed. Then select your Node.js app from the list.Option 2: Install the Chrome Extension NIM (Node Inspector Manager)
I prefer option 2.
Also --debug-brk
is deprecated. Node.js 8.x uses --inspect-brk
Upvotes: 24