firebug

Can you make hovered state in Firebug “sticky?”

一曲冷凌霜 提交于 2019-11-27 01:26:37
问题 When I'm debugging a site, sometimes the hovered selectors are a little long winded and similar to other ones, is there a way to apply a kind of "sticky" state to hover rules in Firebug? Example; I hover over a nav bar and want to copy the selector out of firebug to search in the CSS, but as soon as I move my mouse, the selector (obviously) disappears as the nav <li> isn't hovered anymore. Any way to do this? Thanks :) 回答1: When inspecting links, Firebug shows the default CSS state, i.e.

How do I find which JavaScript is changing an element's style?

巧了我就是萌 提交于 2019-11-27 01:14:40
问题 I have an element that's getting styles applied via JavaScript. I'm not sure exactly where; is there a way to check Firebug to show where the "element.style" is actually coming from? 回答1: If you're sure it's being set on the inline style and not as a consequence of a stylesheet rule, you can detect changes using the non-standard Mozilla watch() method: document.body.style.watch('color', function(name, v0, v1) { alert(name+': '+v0+'->'+v1); }); document.body.style.color= 'red'; You can put

Is there something like “Firebug for IE” (for debugging JavaScript)?

强颜欢笑 提交于 2019-11-27 00:37:25
I'm trying to fix some JavaScript bugs. Firebug makes debugging these issues a lot easier when working in Firefox, but what do you do when the code works fine on Firefox but IE is complaining? lomaxx you can also check out the IE Developer Toolbar which isn't a debugger but will help you analyze the contents of your code. Visual Studio will help with the debugging Fiddler should help analyse the traffic travelling to and from your browser You can try Firebug Lite or use Visual Studio to debug the JavaScript. Since Internet Explorer 8, IE has been shipping with a built-in tool-set for debugging

Why can't I save CSS changes in Firebug? [closed]

↘锁芯ラ 提交于 2019-11-26 23:28:08
Firebug is the most convenient tool I've found for editing CSS - so why isn't there a simple "save" option for CSS? I am always finding myself making tweaks in Firebug, then going back to my original .css file and replicating the tweaks. Has anyone come up with a better solution? EDIT: I'm aware the code is stored on a server (in most cases not my own), but I use it when building my own websites. Firebug's just using the .css file Firefox downloaded from the server, it knows precisely what lines in which files it's editing. I can't see why there's not an "export" or "save" option, which allows

Suggestions for debugging print stylesheets?

谁说胖子不能爱 提交于 2019-11-26 23:23:19
I've recently been working on a print stylesheet for a website, and I realized that I was at a loss for effective ways to tweak it. It's one thing to have a reload cycle for working on the on-screen layout: change code command-tab reload but that whole process gets much more arduous when you're trying to print: change code command-tab reload print squint at print-preview image open PDF in Preview for further inspection Are there tools I'm missing out on here? Does WebKit's inspector have a "pretend this is paged media" checkbox? Is there some magic that Firebug ( shudder ) can do? Rafael

How can I inspect and tweak :before and :after pseudo-elements in-browser?

て烟熏妆下的殇ゞ 提交于 2019-11-26 22:44:27
问题 I have created some fairly elaborate DOM elements with an :after pseudo-element, and I'd like to be able to inspect and tweak them in either Chrome Inspector or Firebug or equivalent. Despite this feature being mentioned in this WebKit/Safari blog post (dated 2010), I can't find this feature at all in either Chrome or Safari. Chrome does at least have checkboxes to inspect :hover, :visited and :active states, but :before and :after are nowhere to be seen. Additionally, this blog post (dated

Can you programmatically access the Firebug console output?

£可爱£侵袭症+ 提交于 2019-11-26 22:44:12
问题 Is it possible to access the previously-logged output of Firebug programmatically? For example: console.log('a'); console.log('b'); console.log('c'); for (var i = 0; i < console.output.length; ++i) { alert(console.output[i]); // "a", "b", "c" } 回答1: Paul Irish created a wrapper for console.log that should solve your problem, have a look here 回答2: Without wrapping window.console yourself, I don't believe this is possible. Looking at the source, it seems that when a Firebug's console method

Is there a method I can override on a JavaScript object to control what is displayed by console.log?

老子叫甜甜 提交于 2019-11-26 22:03:56
问题 I'm thinking in particular of Chrome, though Firebug would be interesting to. I've tried toString() and valueOf(), but neither of those seem to be used. Interestingly, if I take a function it'll display the function definition - but then if I add a toString() method it will show null! var a = function(){}; console.log(a); // output: function (){} a.toString = function(){ return 'a'; }; console.log(a); // output: null a.valueOf = function(){ return 'v'; }; console.log(a); // output: null Any

js override console.log if not defined

最后都变了- 提交于 2019-11-26 19:50:40
问题 Which solution do you recommend, the second is simpler ( less code ), but there are drawbacks on using it ? First: (Set a global debug flag) // the first line of code var debug = true; try { console.log } catch(e) { if(e) { debug=false; } }; // Then later in the code if(debug) { console.log(something); } Second: override console.log try { console.log } catch(e) { if (e) { console.log = function() {} } }; // And all you need to do in the code is console.log(something); 回答1: Neither, but a

Javascript that detects Firebug?

做~自己de王妃 提交于 2019-11-26 19:42:12
What's a surefire way of detecting whether a user has Firebug enabled? Pumbaa80 Original answer: Check for the console object (created only with Firebug), like such: if (window.console && window.console.firebug) { //Firebug is enabled } Update (January 2012): The Firebug developers have decided to remove window.console.firebug . You can still detect the presence of Firebug by duck typing like if (window.console && (window.console.firebug || window.console.exception)) { //Firebug is enabled } or various other approaches like if (document.getUserData('firebug-Token')) ... if (console.log