17

Is there a command line argument in Chrome to start the developer tools on startup without haveing to press Ctrl+Shift+J every time?

Justin
  • 3,255
  • 3
  • 22
  • 20
  • check out https://github.com/Jam3/devtool, and just run it without any scripts – rafaelcastrocouto Apr 17 '16 at 16:08
  • There's now a CLI flag. See https://stackoverflow.com/a/36957422/1669860 – Kayce Basques Jan 08 '18 at 22:37
  • Does this answer your question? [Automatically open Chrome developer tools when new tab/new window is opened](https://stackoverflow.com/questions/12212504/automatically-open-chrome-developer-tools-when-new-tab-new-window-is-opened) – David Moles Apr 07 '21 at 21:26

2 Answers2

31

I think

--auto-open-devtools-for-tabs 

does the trick. It seems to be working only if an instance of Chrome is not already running however.

Draken
  • 3,134
  • 13
  • 34
  • 54
Leif
  • 425
  • 4
  • 8
0

I did not find the way to do it via command line, but here is the workaround that I use, you might find it useful as well First it only works on Windows, though I suspect similar things might be done on Mac and Linux as well.

I use Windows Scripting Host, to send key as if they were preseed from within the app. File keys.wsf

<package>
<job id="js">
  <script language="JScript">
     var shl = WScript.CreateObject("WScript.Shell");
     var WINTITLE= "Chrome"
     shl.AppActivate(WINTITLE);
     WScript.sleep(500);
     shl.SendKeys ("^+i");
  </script>
  </job>
</package>

If you know that your Crome window title is might help to replace WINTITLE

Michael Kariv
  • 1,421
  • 13
  • 20