Firebug 说“此页面上没有 Javascript”,即使页面上确实存在 JavaScript
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17086478/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Firebug says "No Javascript on this page", even though JavaScript does exist on the page
提问by Shaoz
Why does Firebug say there is No Javascript on this page
when there are clearly loads of JavaScript on the page. I even reloaded the page several time to make sure but it still show the same message.
为什么 Firebug 说No Javascript on this page
页面上有明显的 JavaScript 负载。我什至重新加载了页面几次以确保它仍然显示相同的消息。
It never used to do that before, but all of a sudden it misbehaves.
它以前从未这样做过,但突然间它行为不端。
Is it because of some configuration issues or because of something else?
是因为某些配置问题还是因为其他原因?
回答by NickT
As of Firefox version 50, it seems that Firebug will no longer work as Mozilla are migrating to Firefox Devtools. The tab Tools/Web Developer has a 'debugger' option. See this pagefor a discussion on the migration. Read all the posts dated 19 November for further information.
从 Firefox 版本 50 开始,由于 Mozilla 正在迁移到Firefox Devtools,Firebug 似乎不再起作用。选项卡工具/Web 开发人员有一个“调试器”选项。有关迁移的讨论,请参阅此页面。阅读 11 月 19 日发布的所有帖子以了解更多信息。
It seems to me that the option gives less functionality but Firebug per se is never going to be fixed for Firefox 50 and beyond
在我看来,该选项提供的功能较少,但 Firebug 本身永远不会针对 Firefox 50 及更高版本进行修复
回答by jean
EDIT 2017 April
编辑 2017 年 4 月
This answer is now outdated and I'm not even testing it anymore because I'm no longer using Firebug (a shame, I loved it years ago in a time it was The tool of tradefor web developing).
这个答案现在已经过时了,我什至不再测试它,因为我不再使用 Firebug(很遗憾,几年前我喜欢它,当时它是Web 开发的贸易工具)。
EDIT 2014 November
编辑 2014 年 11 月
The original answer is now more than a year outdated due to firebug evolution. Thanks to @AmadeusDrZaius to keep it on tracks
由于萤火虫的进化,原来的答案现在已经过时了一年多。感谢@AmadeusDrZaius 让它保持在轨道上
Answer for outdated firebug versionsFor anyone still with this problem after updating Firebug. Just click Clear Activation Listoption inside the Firebug menu.
对过时的 firebug 版本的回答 对于更新 Firebug 后仍然存在此问题的任何人。只需单击Firebug 菜单内的清除激活列表选项。
For those who can't find it, note that "Clear Activation List" shows up in the dropdown from the Firebug icon in the toolbar, but not the Tools > Web Developer > Firebug menu.
对于那些找不到它的人,请注意“清除激活列表”显示在工具栏中 Firebug 图标的下拉菜单中,而不是“工具”>“Web 开发人员”>“Firebug”菜单中。
I guess due to the bug previous hitting your working page it stays listed as "no activate FB for this site please".
我想由于之前点击您的工作页面的错误,它仍然列为“请不要为此站点激活 FB”。
回答by kiatng
I encountered No Javascript on this pageafter upgrading Firefox to ver 50.0, with Firebug ver 2.0.18. I tried refreshing Firefox, even completely uninstall Firefox and installed again. Nothing works for me.
使用 Firebug ver 2.0.18将 Firefox 升级到50.0版后,我在此页面上遇到了No Javascript。我尝试刷新 Firefox,甚至完全卸载 Firefox 并重新安装。没有什么对我有用。
A couple of hours later, I downgraded Firefox to 49.0.2, and voila, it works right away. I downloaded the old version here.
几个小时后,我将 Firefox 降级到49.0.2,瞧,它马上就可以工作了。我在这里下载了旧版本。
回答by Tod Thomson
I tried everything on this list and nothing worked for me except resetting Firefox like so:
我尝试了此列表中的所有内容,但除了像这样重置 Firefox 外,没有任何效果:
https://support.mozilla.org/en-US/kb/reset-firefox-easily-fix-problems
https://support.mozilla.org/en-US/kb/reset-firefox-easily-fix-problems
回答by BrianVPS
I realize there are already 10 answers to this question, but in my case none of them helped. I'm running Firefox version 39.0 and Firebug version 2.0.11. The only fix is to completely restart Firefox (i.e. not just the tab or instance with the problem).
我意识到这个问题已经有 10 个答案,但就我而言,它们都没有帮助。我正在运行 Firefox 39.0 版和 Firebug 2.0.11 版。唯一的解决方法是完全重新启动 Firefox(即不仅仅是有问题的选项卡或实例)。
Perhaps it's due to Firefox's over-usage of memory, or maybe there's a bug in Firebug. I can't speak to that, but what I do know is it didn't work. I killed Firefox, opened the exact same page again with no changes made and now it works. This has happened to me numerous times and a complete restart always fixes it, but that's the only thing that does.
也许是由于 Firefox 过度使用内存,或者 Firebug 中存在错误。我不能说,但我所知道的是它没有用。我杀死了 Firefox,再次打开完全相同的页面,没有做任何更改,现在它可以工作了。这在我身上发生过很多次,完全重新启动总是可以修复它,但这是唯一能做的事情。
回答by Sebastian Zartner
Since Firefox 49.0 and Firebug 2.0.18 the Scriptpanel is broken. This is due to some internal Firefox API changes. And because Firebug is officially discontinued, this unfortunately won't get fixed anymore.
从 Firefox 49.0 和 Firebug 2.0.18 开始,脚本面板坏了。这是由于某些内部 Firefox API 更改造成的。并且由于Firebug 已正式停产,因此很遗憾不会再得到修复。
There was also a bug in Firebug 2.0.11 (and below) in combination with Firefox 39.0 causing this problem. This bug is filed as issue 7918.
It happens when the Scriptpanelis enabled and you close Firebug and reopen it.
Firebug 2.0.11(及更低版本)与 Firefox 39.0 中的一个错误也导致了这个问题。此错误已提交为issue 7918。
当启用脚本面板并且您关闭 Firebug 并重新打开它时会发生这种情况。
You can see two related error messages logged to the Browser Console (can be opened via Ctrl+Shift+Jor Firebug menu > Developer> Browser Console):
你可以看到记录到浏览器控制台的两个相关的错误信息(可以通过打开Ctrl+ Shift+J或Firebug的菜单>开发者>浏览器控制台):
error occurred while processing 'attach: TypeError: docShell is null Stack: getChildDocShells@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webbrowser.js:53:7 ...
处理'附加时发生错误:TypeError:docShell 为空堆栈:getChildDocShells@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webbrowser.js :53:7 ...
and
和
onPacket threw an exception: Error: Server did not specify an actor, dropping packet: {"error":"unknownError","message":"error occurred while processing 'attach: TypeError: docShell is null\nStack: getChildDocShells@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webbrowser.js:53:7 ...
onPacket 抛出异常:错误:服务器未指定参与者,丢弃数据包:{"error":"unknownError","message":"处理 'attach: TypeError: docShell is null\nStack: getChildDocShells@resource: 时发生错误: //gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webbrowser.js:53:7 ...
Solution:
解决方案:
The only solution until this bug is fixed is to restart Firefox completely.
修复此错误之前的唯一解决方案是完全重新启动 Firefox。
回答by user2799817
Similar things have happened to me because I forgot to add the closing tag.
类似的事情发生在我身上,因为我忘记添加结束标签。
DON'T do this:
不要这样做:
<script src="some.url" type="text/javascript">
or
或者
<script src="some.url" type="text/javascript"/>
DO this instead:
改为这样做:
<script src="some.url" type="text/javascript"></script>
回答by Luis Eduardo
The same problem just happened to me. I thought that it was a problem in my scripts, but I checked google.com and the problem persisted. My problem was that I had updated my version of FF and kept the old version of FireBug. When I updated FireBug and everything was solved.
同样的问题刚刚发生在我身上。我认为这是我的脚本中的问题,但我检查了 google.com 并且问题仍然存在。我的问题是我已经更新了我的 FF 版本并保留了旧版本的 FireBug。当我更新 FireBug 时,一切都解决了。
回答by Krushna
From firefox 49, the fire bug will be built in and it is called fire-bug next. So the fire bug add on won't work properly and no issues will be solved. So you can use firefox inspector. See herefor details information
从 firefox 49 开始,fire bug 将被内置,接下来称为 fire-bug。因此,添加的火虫将无法正常工作,并且不会解决任何问题。所以你可以使用firefox检查器。请参阅此处了解详细信息
回答by derloopkat
If the problem only shows up on a single page, check that your script folder is referenced from current folder (".") or that's reachable from the server root ("/").
如果问题仅出现在单个页面上,请检查您的脚本文件夹是从当前文件夹 (“.”) 引用的还是可以从服务器根目录 (“/”) 访问的。
<script src="./scripts/pagescripts.js" type="text/javascript"></script>
may not be the same as
可能不一样
<script src="/scripts/pagescripts.js" type="text/javascript"></script>