使用 chrome.debugger.attach 会引发错误“无法附加到此目标。” 当谷歌文档加载时

Jon*_*naK 5 google-chrome google-chrome-extension

我目前正在编写一个 Google Chrome 扩展,它使用 Chrome 调试器来记录网络活动(除其他外)。然而,自从 Chrome v. 69 发布以来,我注意到附加到加载 Google Drive 或 Google Docs 的任何选项卡都会失败。chrome.runtime.lastError告诉我这一点Cannot attach to this target.——但没有提供更多细节。我没有在 Chromium(版本 69 和 71)中观察到这种行为,但在 Chrome Canary(v.71)以及当前的稳定版本(v.69)中观察到这种行为。

这是我在清单中的权限:

"permissions": [
  "storage",
  "debugger",
  "tabs",
  "<all_urls>"
]
Run Code Online (Sandbox Code Playgroud)

我像这样连接到选项卡:

chrome.debugger.attach({tabId: theTab.id}, "1.2", function () { /* code... */ });
Run Code Online (Sandbox Code Playgroud)

我到处搜索,没有找到任何东西...我无法判断 Google 是否完全阻止了对 Drive/Docs 上的调试器的访问,是否是我的错误,或者是什么。它在其他 Google 产品和其他地方(例如 StackOverflow)上运行得很好。

有谁知道我哪里出错了,和/或我如何绕过这个限制?我缺少许可吗?是否记录了 Drive/Docs 有特定限制的任何地方?

很感谢任何形式的帮助。