Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome's --auto-open-devtools-for-tabs

I'm trying to get the devtools to open automatically when starting chrome from a shortcut with a command line switch --auto-open-devtools-for-tabs.

i.e. the path of that shortcut is: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -incognito -auto-open-devtools-for-tabs (or --auto-open-devtools-for-tabs).

But both don't seem to open the dev tools, neither does entering in the cmd chrome.exe -auto-open-devtools-for-tabs (or --auto-open-devtools-for-tabs), of course when in Chrome's folder.

Maybe I'm doing something wrong?

The command is from:

http://peter.sh/experiments/chromium-command-line-switches/#auto-open-devtools-for-tabs

https://stackoverflow.com/a/41452619/4279201

like image 691
shinzou Avatar asked May 11 '17 08:05

shinzou


1 Answers

This flag only applies when you open the first chrome instance.

  1. Close all chrome windows
  2. Run "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -incognito -auto-open-devtools-for-tabs

If you want your daily browser, with all tabs but without devtools, at the same time as you're debugging a website with devtools automatically opening, you have to run them separately.

Alternative: Stable + Beta

One example is to use example Chrome stable and Chrome beta.

"C:\Program Files\Google\Chrome\Application\chrome.exe"

"C:\Program Files\Google\Chrome Beta\Application\chrome.exe" --auto-open-devtools-for-tabs

Alternative: data-dir

"C:\Program Files\Google\Chrome\Application\chrome.exe" -incognito --auto-open-devtools-for-tabs --user-data-dir="%APPDATA%\ChromeDevOrAnyName"

like image 162
hultqvist Avatar answered Oct 19 '22 10:10

hultqvist