2

Is it possible to open the Chrome NodeJS debugger after running node --inspect-brk and going to chrome://inspect in a Tab instead of a standalone Window?

2 Answers 2

2
~$ curl http://localhost:9229/json/list 
[ {
  "description": "node.js instance",
  "devtoolsFrontendUrl": "chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/043a8dfa-cd2b-4d41-82db-740a9d332499",
  "faviconUrl": "https://nodejs.org/static/favicon.ico",
  "id": "043a8dfa-cd2b-4d41-82db-740a9d332499",
  "title": "/Users/josh/.nvm/versions/node/v8.9.1/bin/node",
  "type": "node",
  "url": "file://",
  "webSocketDebuggerUrl": "ws://127.0.0.1:9229/043a8dfa-cd2b-4d41-82db-740a9d332499"
} ]

Open the chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/043a8dfa-cd2b-4d41-82db-740a9d332499 URL in a Chrome tab.

The Inspector Help page links to a Chrome extension that purports to open this link automatically, but it didn't work for me.

3
  • What node version are you using? devtoolsFrontendUrl is not present when I do the curl, but the extension is working! Im using v8.9.1 Commented Nov 24, 2017 at 19:46
  • Also 8.9.1. I don't know what the difference could be.
    – Josh Lee
    Commented Nov 24, 2017 at 20:48
  • On macOS you can execute the following (Provided you have jq installed): open -a 'Microsoft Edge.app' "$( curl -sSf htt p://localhost:9229/json/list | jq -r '.[0].devtoolsFrontendUrl' )" You could change Microsoft Edge.app for Chrome.app or another Chromium browser app Commented Oct 24, 2023 at 16:20
1

This extension worked for me

enter image description here

https://chrome.google.com/webstore/detail/nodejs-v8-inspector-manag/gnhhdgbaldcilmgcpfddgdbkhjohddkj/related?hl=en

It supports opening in a tab and reconnecting automatically. It's add supported.

Not the answer you're looking for? Browse other questions tagged or ask your own question.