I have a use case where I need Chromeâs DevTools to automatically open in an undocked state for each new tab or window, but without shifting focus away from the browser window.
To achieve this, Iâm doing the following:
⢠Launching Chrome with the `--auto-open-devtools-for-tabs` cli argument.
⢠Modifying Chromeâs preferences to have `currentDockState = 'undocked'`.
However, when DevTools opens, it immediately steals focus, which disrupts my workflow.
Is there a way to keep DevTools undocked and automatically open in the background without shifting focus away from the main browser window? Or alternatively, is there a way to programmatically move the focus back to the browser window after DevTools opens?