In order to automate running and debugging node.js applications the debug URL needs to 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 paste the URL in chromium is working fine. however as I have stated this step needs to be automated.
How to open an URL of the form chrome-devtools://devtools/bundled/inspector.html
in chromium/google-chrome from script or command line (Linux)?
It's not clear if your goal is just to have this automated for you, or if you want to figure out a way to script this yourself.
That said, there is a package on NPM called inspect-process
that automates the process of opening DevTools windows. (Github). It serves as a replacement on the command-line for node
. e.g.:
inspect myScript.js
instead of node myScript.js
and it automatically opens up a DevTools window.
If you needed to script this process yourself you could likely use code from that package as well.
At the moment, this doesn't appear to be possible. I did find this bug report in the Chrome forums.
The only solution I was able to find was to use AppleScript as described here, but you said Linux so that won't be of much help to you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With