54

我有一个铬扩展钩入devtools。理想情况下,我想要一个徽章,当点击它时,在我创建的新选项卡上打开devtools。有没有办法从背景页面做到这一点?我可以以编程方式从Google Chrome扩展程序打开devtools吗?

+0

您可以在哪里找到问题的答案? – GeorgeU

+0

这仍然是非常好的不是 - 任何更新? – underrun

+0

我已经发布(并将添加一个赏金)一个相关的,但稍有不同的问题在这里:http://stackoverflow.com/questions/16660325/open-safari-google-chrome-developer-tools-programmatically- from-javascript – ELLIOTTCABLE

回答

2

不幸的是,有没有办法做到这一点...

铬:// chromewebdata链接仅仅在进行的开发工具的实例已经打开......

3

是的,你可以(或不)使用实验API chrome.experimental.webInspector
http://code.google.com/chrome/extensions/experimental.html
你甚至可以更改的内容和它的面板。
请注意,您将无法提交使用实验性API的扩展程序。

+0

但是,值得注意的是,如果您确定,您可以[在扩展程序库外部托管这些程序](http://code.google.com/chrome/extensions/external_extensions.html)。虽然这意味着用户也必须使用[dev channel](http://www.chromium.org/getting-involved/dev-channel)并启用[Experimental Extension APIs标志](http:// code .google.com /铬使用/扩展/ experimental.html#)。 – Alasdair

+12

['experiments.webInspector'](http://code.google.com/chrome/extensions/trunk/experimental.webInspector.html)现在称为['chrome.experimental.devtools'](http:// code。 google.com/chrome/extensions/trunk/experimental.devtools.html)。有些API不再是实验性的,它们列在['chrome.devtools'](http://code.google.com/chrome/extensions/trunk/devtools.html)中。 **不幸的是,无法通过Chrome扩展程序自动打开开发工具**。 –

+0

@Rob W,没有注意到'chrome.devtools。*'API已经超出了实验API的范围。 –

相关问题