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

浪尽此生 提交于 2019-12-22 04:55:18

问题


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


回答1:


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 (x86)\Google\Chrome\Application\chrome.exe"

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

Alternative: data-dir

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



来源:https://stackoverflow.com/questions/43909743/chromes-auto-open-devtools-for-tabs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!