Devtools 不工作并显示奇怪的错误。

huangapple go评论73阅读模式
英文:

Devtools not working and giving strange error

问题

我正在尝试使用Devtools,但在控制台中出现以下错误:

由于它连接到托管多个顶级框架的进程,DevTools调试器已禁用,DevTools调试器无法正常工作。请使用--disable-features=ProcessPerSiteUpToMainFrameThreshold重新启动浏览器以启用调试器。

我使用的是Chrome Beta 115.0.5790.56,这种情况最近才开始发生。这是Chrome的一个错误吗?

英文:

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?

答案1

得分: 3

根据 https://niek.github.io/chrome-features/

> ProcessPerSiteUpToMainFrameThreshold
>
> 在某个阈值之前重新使用 RenderProcessHost。该模式忽略软进程限制,表现得就像对所有站点都采用进程每站点策略一样,但有一个额外的限制,即只有在该进程中的主框架数量保持在阈值以下时才能重新使用进程。

这一功能目前在正式版 Chrome 中默认处于禁用状态,但似乎在 Chrome Beta 分支中默认处于启用状态。

我正在使用 Chrome beta 版本 116.0.5845.42,该版本在 chrome://flags/#enable-process-per-site-up-to-main-frame-threshold 中提供了一个切换此功能的选项。

在那里的描述是:
> 启用 ProcessPerSite 直到主框架阈值
主动地重新使用同站点的渲染器进程来托管多个主框架,直到达到某个阈值。- Mac、Windows、Linux、ChromeOS、Android、Fuchsia、Lacros

禁用该功能并重新启动浏览器将消除错误消息。

英文:

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.

答案2

得分: 1

这里有一个解决方案,不需要下载Beta分支。

我一直在使用Chrome版本115.0.5790.110(最新版)进行调试,但是在昨天或前天开始出现了这个问题。

这个版本不支持通过chrome://flags来更改设置。

而是通过在开始菜单中键入"cmd"来打开Windows命令行,并运行以下命令:

start chrome --disable-features=ProcessPerSiteUpToMainFrameThreshold

请注意,即使不运行chrome这样,我注意到在重新启动浏览器几次后,最终我可以正常进行调试。

英文:

Here is a solution that does not require downloading Beta branch.

I have been debugging with Chrome Version 115.0.5790.110 (latest) every day and first started seeing this issue yesterday or the day before.

This version does not support changing the settings via chrome://flags.

Instead open the Windows command line by typing "cmd" in the start menu and run:

start chrome  --disable-features=ProcessPerSiteUpToMainFrameThreshold

Note that even without running chrome like this, I noticed that after restarting the browser a few times, eventually I was able to debug as normal.

答案3

得分: 1

我正在运行版本 115.0.5790.114(官方版本)(x86_64),在 MacOS 上看到控制台中出现相同的消息。

如果我在以下位置查找标志:

chrome://flags/#enable-process-per-site-up-to-main-frame-threshold

它不在那里。

但是,我可以通过从终端启动 Chrome 并使用以下命令来消除错误:

$ /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-features=ProcessPerSiteUpToMainFrameThreshold

希望 Google 能尽快修复这个问题。

英文:

I am running Version 115.0.5790.114 (Official Build) (x86_64) on MacOS and see the same message in the console.

If I look for the flag in:

chrome://flags/#enable-process-per-site-up-to-main-frame-threshold

It isn't there.

I can get rid of the error though by starting Chrome from the Terminal with:

$ /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-features=ProcessPerSiteUpToMainFrameThreshold

Hopefully Google fixes this chop chop.

答案4

得分: 0

与ProcessPerSiteUpToMainFrameThreshold相同的问题,从7月中旬开始出现。我有一个带有多个嵌入iFrame的JavaScript应用程序。调试器报告有太多的iFrame,并且我的源JavaScript文件未加载到调试器中。在Firefox和Chrome中都可以正常工作。

现在已更新Chrome到版本115.0.5790.171。

错误消失了,但是我的调试器中仍然没有源JavaScript。其他网站正常工作,只有我的应用程序出现问题。

我尝试了:

启动Chrome --disable-features=ProcessPerSiteUpToMainFrameThreshold

调试器中仍然没有源代码。

在chrome://flags中没有看到标志。

英文:

Same problem with ProcessPerSiteUpToMainFrameThreshold, started mid-July. I have a JavaScript app with several embedded iFrames. Debugger complained too many iframes and my source JavaScript files were not loaded into the debugger. All works in Firefox and Chrome

Updated chrome now to 115.0.5790.171

Error went away, but still, no source JavaScript in my debugger. Other sites work, just not my app.

I tried:

start chrome --disable-features=ProcessPerSiteUpToMainFrameThreshold

Still no source code in debugger.

Do not see flags in chrome://flags

[Devtools 不工作并显示奇怪的错误。1
Devtools 不工作并显示奇怪的错误。
Devtools 不工作并显示奇怪的错误。

答案5

得分: 0

我在Ubuntu 20.04上运行版本115.0.5790.114(官方版本)(x86_64),我在chrome://flags中没有找到标志,所以我尝试通过命令行运行Chrome:

google-chrome --disable-features=ProcessPerSiteUpToMainFrameThreshold

这非常有效,在几天后,Chrome恢复正常运行。

英文:

I am running Version 115.0.5790.114 (Official Build) (x86_64) on Ubuntu 20.04, I didnt found the flags on chrome://flags instead I tryied to run chrome through command line:

google-chrome  --disable-features=ProcessPerSiteUpToMainFrameThreshold

It works very well, in a few days chrome started to works normals as usual

huangapple
  • 本文由 发表于 2023年7月7日 00:29:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/76630860.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定