Open chrome-devtools: // URL from script / command line, NOT using copy

To automate the launch and debugging of node.js applications, the debug URL must be opened from a script; eg:.

chromium "chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9230/9229"&

If I copy the paste, the url in chrome is working fine. however, as I said, this step needs to be automated.

How to open the url of the form chrome-devtools://devtools/bundled/inspector.html in chromium / google-chrome from a script or command line (Linux)?

+5
source share
2 answers

It's not clear your goal is simply to automate this for you, or if you want to determine the script method yourself.

However, there is an NPM package called inspect-process that automates the process of opening DevTools windows. ( Github ). It serves as a command line replacement for node . eg:

inspect myScript.js instead of node myScript.js

and it automatically opens the DevTools window.

If you need to script this process yourself, you can probably use the code from this package.

0
source

This is not currently possible. I found this error report on the Chrome forums.

The only solution I could find was to use AppleScript as described here , but you said that Linux would not be very useful to you.

0
source

Source: https://habr.com/ru/post/1265228/


All Articles