Search code examples
google-chromegoogle-chrome-devtoolsdevtools

Devtools not working and giving strange error


I'm trying to use Devtools but I'm getting the following error printed to the console:

DevTools debugger is disabled because it is attached to a process that hosts multiple top-level frames, where DevTools debugger doesn't work properly. Please relaunch the browser with --disable-features=ProcessPerSiteUpToMainFrameThreshold to enable debugger.

I'm on Chrome Beta 115.0.5790.56 and this only started happening recently. Is this a bug in Chrome?


Solution

  • According to https://niek.github.io/chrome-features/ :

    ProcessPerSiteUpToMainFrameThreshold

    Reuses RenderProcessHost up to a certain threshold. This mode ignores the soft process limit and behaves just like a process-per-site policy for all sites, with an additional restriction that a process may only be reused while the number of main frames in that process stays below a threshold.

    The feature is currently disabled by default in the normal chrome release but appears to have been set to enabled by default in the Chrome Beta branch.

    I'm using Chrome beta version 116.0.5845.42 which has a toggle for this feature in chrome://flags/#enable-process-per-site-up-to-main-frame-threshold.

    The description there is

    Enable ProcessPerSite up to main frame threshold Proactively reuses same-site renderer processes to host multiple main frames, up to a certain threshold. – Mac, Windows, Linux, ChromeOS, Android, Fuchsia, Lacros

    Disabling the feature and restarting the browser will get rid of the error message.