从 chrome 扩展访问 chrome 开发工具?

accessing chrome dev tools from chrome extension?

我希望能够访问开发工具网络选项卡并从那里复制一些网址。可能吗?我希望扩展程序本身能够访问当前页面的开发工具网络选项卡并执行操作。在 google 中进行了搜索,但没有找到任何关于此的具体信息。

我简单引用一下chrome.devtools.network API的描述:

Use the chrome.devtools.network API to retrieve the information about network requests displayed by the Developer Tools in the Network panel.

你需要继续努力 Google-Fu..


也就是说,一些评论。

此 API 在开发工具打开时可以访问 - 因为它设计用于扩展 开发工具本身。 an explanation 说明了哪种扩展使用它以及如何使用它。

如果您需要在开发工具关闭时访问此数据,您的下一个最佳选择是 chrome.debugger API,它使用与开发工具本身相同的协议与页面通信。请注意:这是一个非常重的锤子,当打开真正的 Dev Tools 时它会停止工作。