Persist Chrome Dev Tools Preferences in Incognito - google-chrome

Is it possible for chrome dev tools to remember preferences when loading a new incognito session?
I prefer to have dev tools docked on the right - and it's annoying to constantly set this every time a new incognito instance is started.
A similar question was filed as an issue on the chromium project here: https://code.google.com/p/chromium/issues/detail?id=376788

Currently it's possible only with Chrome Canary:
DevTools will now persist your appearance preferences (docking
position, size, pane layout, etc) and devtools settings (disable
cache, etc) into the incognito window.
About the feature
Download Chrome Canary here

Related

Chrome dev tools won't open. How do I troubleshoot that?

I have a chrome browser open. I press f12 and nothing happens. I click the three dots at the top right, click More Tools, click Developer Tools, and nothing happens. The Developer Tools options is not grayed out. There is no icon in the task bar so this isn't a "hidden window" issue. I've restarted Chrome. I've rebooted and I've uninstalled/reinstalled Chrome. I'm on Chrome version Version 89.0.4389.82 (Official Build) (64-bit) and Windows 10 Version 1909 (OS Build 18363.1440). What steps can I take to resolve this.
UPDATE: Using chrome task manager, I do see that the dev tools process is being kicked off and running, it's just not visible in any way.
UPDATE 2: If I run in incognito mode, devtools works. I have already disabled all extensions and cleared all site data (cookies and files). Still nothing for devtools in non-incognito chrome.

Using a Chrome extension to resize undocked dev tools window

There's a bug on Vivaldi browser which will probably remain unfixed for the upcoming months: undocked dev tools windows do not remember their previous size across tabs, so each time you open dev tools they are small. There's also another dev tools bug which I'd like to workaround which includes focusing the dev tools window. Those bugs are driving me nuts!
So, I tried to create a Chrome extension and see if that could catch the dev tools opening event and resize the dev tools undocked window.
The first part, I've done it by using a content script which catches f12 and ctrl+shift+i and other ways of opening dev tools. Then, the content script sends a message to a background script and it should resize the opened dev tools window.
Here's the problem: there doesn't seem to be any way to get opened dev tools window in Chrome Extension API.
I can get all the opened normal windows, but from that same API (chrome.windows) I can't find opened dev tools windows.
Is there any way one can access opened dev tools windows?
I tried using chrome.devtools API but that's only accessible inside dev tools panels.
Being this a private extension which will never get published, I can also try to use chrome.developerPrivate and other private APIs, but I don't know how to make them work.
Do you have any idea on how to proceed to get all opened dev tools windows? Could it be there isn't a way?
If there isn't a way, could you maybe point me in the right direction into using private Chrome APIs in any way?

Open page in new browser window with device mode dev tools

Using window.open to open a new window in chrome the device icon in the dev tools is not present.
window.open('https://google.com/', '_blank');
I feel like this is a bug in Chrome as I'm not sure why they would want to prevent it? Or am I missing a way?
I saw another question but the bug that was logged was about network throttling not allowing device tool available. How to toggle Device Mode on a popup window in Chrome?
I'm assuming this is a bug and have opened an issue

Chrome dev tools settings: where is the Experiments tab to Allow custom UI themes?

I am using chrome version 36+
according to this page, I should be able to allow custom themes using the following instructions:
Installation Instructions
Add this theme
Goto chrome://flags and Enable Developer Tools experiments.
Open developer tools settings, select Experiments tab, and check 'Allow custom UI themes'.
Reload devtools.
I do not see such a tab in the dev tools settings. I see only 'general', 'workspace', and 'shortcuts'
These are some simple steps to follow, hope it will be helpful.
Open a new chrome tab, type chrome://flags
Find, "Enable Developer Tools experiments." using ctrl/cmd+f or simply searching for it by scrolling down the page.
Click the "enable" link
Click on "Relaunch Now" at the bottom of the page.
After restarting Chrome, open DevTools, DevTools settings, and select the experiments tab.
Now select the experiment you want (e.g. "Allow custom UI themes").
You need to reload devtools after: Alt-R will reload devtools itself, or you can just close and reopen it.
To get to the Dev Tools Experiments area you have to click on the gear icon in the inspector.
If still not working you should go to:
chrome://extensions/
And click the 'Enable' checkbox for the DevTools extension you wish to enable.
Had the same issue,
I found I was going to browser settings which is NOT where you should be going to ,
You need to go to developer setting .
i.e right click>inspect element> dev tools
You need to restart the browser after changing the flag at chrome://flags
I found it. There is a checkbox under experiments tab:
Allow custom UI themes
Restart chrome just not means to close the chrome and then open it. you should click the 'Relaunch Now' button of the flags tab. and then it's work for me.
loislo's answer is absolutely right (You need to restart the browser after changing the flag at chrome://flags). But notice that your chrome can work in the background. Go to the tray, look for the chrome icon and exit.
Navigate to chrome://flags/
Find and enable Developer Tools experiments Mac, Windows, Linux, Chrome OS
Relaunch Chrome, open develop tool, setting, you will see experiments tab.
My Chrome version: Version 61.0.3163.100
2022 update: There doesn't seem to be any option in chrome://flags but there is an option:
devtools > settings > experiments > Allow extensions to load custom stylesheets

Automatically open Chrome Dev Tools with target='_blank' link?

When you click a target='_blank' link, it naturally opens a new tab in Google Chrome. For particular sites, I need to use the Chrome Developer Tools to examine the http requests for any new tabs that are opened.
Whenever you have Chrome Dev Tools open on your current page and then click a link that opens a new tab, Chrome Dev Tools are not opened on the new page by default. Opening Chrome Dev Tools at this point is too late because the tools do not capture the http requests for the page.
Also, in many cases, these new tabs go through a series of redirects before reaching the final page, so I cannot simply reload the page after opening Chrome Dev Tools.
The only workaround I can think of is, in the case that the site I'm working on is on a local development server, I can temporarily change the link from target='_blank' to target='_self', but this is unrealistic for a site with thousands of links or for a site that I have no control over the code.
Is it possible to set Chrome Dev Tools to automatically open with every new tab (opened either manually or via target='_blank'?
I'm not sure as of which Chrome version this changed, but if you click on the Settings wheel on dev tools:
You'll see a Global section with a checkmark for "Auto-Open DevTools for popups", which works for opening target="_blank" links with a devtools window:
It's possible to auto open devtools for all the new tabs instead of just target = _blank. When launching google chrome, pass the flag --auto-open-devtools-for-tabs. It enables launching of devtools for all the windows created automatically.
For linux
google-chrome --auto-open-devtools-for-tabs
For Mac
open -a "Google Chrome" --args --auto-open-devtools-for-tabs
You can only open DevTools window via UI action or keyboard shortcut. There is no way to do this automatically.