Seamless node debug with chromium extension
$ # clone repo
$ git clone [email protected]:kino/seamless-node-debug.git
$ cd seamless-node-debug
$ nvm use # in case you're osx user
$ npm install
- Add
seamless-node-debug
to devDependencies of your app. - Clone this project and install chromium extension from "extension" directory to your browser.
- Send new URLs to Unix socket
{os.tmpdir}/seamless-node-debug.sock
and browser tab with devtools inspector will be replaced with it immediately. - Profit (Вигода)!
This repo consists of three parts: chromium extension, native host app and example of node.js script which communicates to Unix socket. Native host app is started by browser when first extension starts listening to events from this app.
Chromium extension id is lfmolhfcmmgnacfibfpbemchjmcekkii
. Extension listens to native host app which is started by Chromium. Native host app emits new devtools URL to stdout.
Python native messaging app which is started by Chromium. It emits new devtools URL to stdout and listens to messages from unix socket.
Run it like this: node host/example-send.js chrome-devtools://devtools/remote/...
where second argument is URL of devtools tab. It will be transmitted to chromium extension through native host app.