Open Chrome from terminal with developer console open
Solution 1
The flag you're looking for is --auto-open-devtools-for-tabs. Please note, that you should quit Chrome before this setting will take effect.
This has worked at least since Chrome 55.0.2883.87 m (the latest version as of initial post)
Solution 2
A Google employee maintains this list of automatically updated Chromium flags. There doesn't seem to be a flag for opening Chrome with developer console open.
Solution 3
What exactly are you trying to achieve by that? If you are trying to run some kind of automated tests, you should try out PhantomJS.
Solution 4
Seems there is no such option. I added a feature request in Chrome product forum https://productforums.google.com/forum/#!category-topic/chrome/give-feature-feedback-and-suggestions/mac/Stable/3HYIAl8_ndc
Related videos on Youtube
![Maros](https://i.stack.imgur.com/OxF9y.jpg?s=256&g=1)
Maros
Updated on June 03, 2022Comments
-
Maros about 2 years
I can run Google Chrome from the command line using
$ google-chrome
, but what flag can I pass to open it with developer console already open, preferably open to the console tab?I checked the man page for google-chrome but it states that
Google Chrome has hundreds of undocumented command-line flags that are added and removed at the whim of the developers.
I'm hoping one of those undocumented flags does what I want.
-
statox over 7 yearsYou should change your accepted answer to @Dethariel's one it works on newer versions of chrome.
-
shinzou about 7 yearsuh no it doesn't work, it starts chrome normally without the dev tools open.
-
Dethariel about 7 years@kuhaku this worked for everybody I spoke with so far. Are you sure you're spinning up chrome correctly?
-
toad almost 7 yearsIt does work. You just need to flag '--args' and then '--auto-open-devtools-for-tabs'. Also make sure you quit Chrome before running the command.
-
Nacho Coloma almost 7 yearsThis argument will open devtools on every new tab, not just the requested page, and you need to exit Chrome before running the command.
-
Brian Hannay over 6 yearsDidn't work for me, but I didn't close Chrome beforehand.