无法在开发人员工具窗口中查看内容脚本引用 [英] Unable to view content script references in the developer tools window
问题描述
当我使用开发人员工具查看我的扩展名时,我只看到生成的后台文件background.js;我的内容脚本不会显示在内容脚本选项卡下。任何想法为什么?清单的相关部分如下所示:
content_scripts:[{
run_at:document_end ,
js:[postMsg.js],
matches:[https://groups.google.com/forum/*]
}],
postMsg.js注入页面,但不会显示在开发人员工具窗口中, m无法调试。
只要你在一个与
有关匹配的更多信息
When I view my extension with the developer tools, I only see the generated background file, background.js; my content script doesn't appear under the content scripts tab. Any ideas why? The relevant part of the manifest looks like this:
"content_scripts": [{
"run_at": "document_end",
"js": ["postMsg.js"],
"matches": ["https://groups.google.com/forum/*"]
}],
postMsg.js gets injected into the page, but never appears in the developer tool window, so I'm unable to debug it.
As long as you are on a page that matches the "Match patterns and globs" from your manifest, you will see the content script(s) under the Sources -> Content Scripts pane.
You may need to refresh (F5) the page (and/or your extension, then the page) to see it:
For more information on matching that cryptic number to an extension, see this answer.
这篇关于无法在开发人员工具窗口中查看内容脚本引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!