Chrome中的FireBug不会显示在本地网站上 [英] FireBug in Chrome doesn't show up on local websites

查看:175
本文介绍了Chrome中的FireBug不会显示在本地网站上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我右键单击本地html页面并选择Inspect with FireBug Lite时,没有任何反应......在常规在线网站上它不工作,除了 https://chrome.google.com/webstore/category/apps



任何人都有相同的经历?我有最新版本的扩展(但它是从2011年开始的):/ b
$ b

更新:在一些本地站点上它显示!在两个Web应用程序(PHP,Rails)上它确实有效,但是在一些静态HTML文件中,我尝试过它没有......

解决方案<显然这是正常的...:

它不适用于本地网页

如果本地页面是指通过file:///协议访问的文件,那么是的,Firebug Lite不能与file:///协议一起使用。这是一项JavaScript安全限制,可防止恶意网页访问您计算机中的文件。另外,请注意,尽管您可以在浏览器中加载本地页面(它将正确渲染),但它的行为与托管在Web服务器中的行为不完全相同。



解决方案:
您可以通过将您的页面加载到机器中安装的Web服务器中来解决此问题,以便通过http://地址访问本地文件。这是最好的解决方案:它更安全,并且您可以充分利用Firebug Lite可以提供的功能。我建议使用Apache HTTP Server,但您可以使用任何人(例如IIS)。






参观?它是Chrome的内部页面
(例如chrome:// downloads /),或与Google Chrome
的其他扩展程序 https://chrome.google.com/extensions/ )?



Google Chrome将不允许内容脚本(需要Firebug Lite)
在这些页面上运行。问题是,Chrome不会通知
用户,也不会通知扩展程序。换句话说,Firebug Lite无法知道内容脚本是否被加载,而我们
通过嗅探网址并检测您何时访问
开始的网址来解决此问题使用chrome://或 https://chrome.google.com/extensions/
在这种情况下提醒用户。


When I right-click on the local html page and select "Inspect with FireBug Lite" nothing happens... on regular online sites it works except for "https://chrome.google.com/webstore/category/apps"

anyone had the same experience? I have the latest version of the extension (but it's from 2011 :/)

UPDATE: on some local sites it does show! on two web apps (PHP, Rails) it did work, but on a few static HTML files I tried it didn't....

解决方案

Apparently this is normal...:

It doesn't work on local pages

If by "local pages" you mean files accessed via "file:///" protocol then yes, Firebug Lite doesn't work with "file:///" protocol. This is a JavaScript security restriction to prevent malicious web pages from accessing files in your your machine. Also, please note that the while you can load a "local page" in the browser (it will render properly) it will NOT behave exactly the same as when hosted in a web server.

Solution: You can solve this problem by loading your page in a web server installed in your machine, so you can access that local files through "http://" addresses. This is the best solution: it is safer, and you'll get the most of what Firebug Lite can give you. I recommend using Apache HTTP Server, but you can use anyone (like IIS for example).


Which exact URL are you visiting? It is an internal Chrome's page (like "chrome://downloads/"), or some page related to Google Chrome extensions "https://chrome.google.com/extensions/")?

Google Chrome won't allow content scripts (required by Firebug Lite) running on such pages. The problem is that Chrome does not inform the user and neither the extension about it. In other words, there is no way to Firebug Lite know if the content script was loaded or not, and we worked around this by sniffing the URL and detecting when you visit URLs that begins with "chrome://" or "https://chrome.google.com/extensions/", alerting users in such cases.

这篇关于Chrome中的FireBug不会显示在本地网站上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆