FireBug Lite messageQueue null

99封情书 提交于 2019-11-28 07:27:23
heymatthew

This is a known bug that affects IE7 (and IE8) and is being tracked on the firebug issue tracker.

This is still an issue on all channels (Firebug 1.4 stable/debug/beta/developer).

Disclaimer: If you're going to use these methods, please subscribe to the discussion about this bug and make sure you stop using this contrived one either when it's fixed, or Firebug 1.5 comes out.

If you need to use firebug now, you could use firebug 1.3. This method I can't find documented anywhere...

<script type="text/javascript"
    src="https://getfirebug.com/releases/lite/1.3/firebug-lite.js"></script>

A better approach would be to use Firebug 1.3 as a bookmarklet. I've hacked up this bookmarklet URL based on the firebug release archive:

javascript:(function(F,i,r,e,b,u,g,L,I,T,E){if(F.getElementById(b))return;E=F[i+'NS']&&F.documentElement.namespaceURI;E=E?F[i+'NS'](E,'script'):F[i]('script');E[r]('id',b);E[r]('src',I+g+T);E[r](b,u);(F[e]('head')[0]||F[e]('body')[0]).appendChild(E);E=new%20Image;E[r]('src',I+L);})(document,'createElement','setAttribute','getElementsByTagName','FirebugLite','3','releases/lite/1.3/firebug-lite.js','releases/lite/latest/skin/xp/sprite.png','https://getfirebug.com/','#startOpened');

Just dump it into your 'links' bar using the above in the URL field.

One possible cause of this: if there's no stylesheet or CSS style data. No idea why.

If there is no CSS and you're seeing this error, add some and Firebug Lite might just work again.


For example, this JSbin, with a token CSS rule, works with Firebug Lite in IE8:

http://jsbin.com/etecub/5/

Code: http://jsbin.com/etecub/5/edit


This JSbin, identical but with no CSS rules, fails to load Firebug Lite in IE8 with the error 'this.messageQueue' is null or not an object:

http://jsbin.com/etecub/6/

Code: http://jsbin.com/etecub/6/edit


It seems like it doesn't matter if the rule is actually applied or not (e.g. http://jsbin.com/etecub/9 works fine). If you've got a stylesheet attached and see this error anyway, and the above doesn't work, maybe try adding a <style> block to the document with a CSS rule or two.

I had the same issue with Firebug Lite not opening with my Meteor App.

After reading the bugtracker discussions I tried the debug-version, which is basically only the uncompressed version of the library. And yes, that made the difference and Firebug Lite now starts in both Chrome and Safari.

The tag I am using right now:

<script type="text/javascript" src="https://getfirebug.com/firebug-lite-debug.js"></script>

Just saw an answer that helped me, from here: https://github.com/angular/angular.js/issues/3596. The bug-report itself is on the Angular project repo, but it doesn't have anything to do with Angular -- the problem, for me, was manifesting itself on a vanilla HTML/CSS/JS page, and the fix worked there as well.

Quoting from there:

firebug-lite-beta.js:30905 Uncaught TypeError: Cannot read property 'push' of undefined

Adding basic null check:

if (typeof this.messageQueue == 'undefined') {

       this.messageQueue = [];

}

Seems to be solving the issue.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!