firebug

Why aren't these two bits of JavaScript equivalent?

三世轮回 提交于 2019-12-07 14:26:49
问题 in jquery 1.4.2, ff 3.6.6: The following code produces three divs, which write messages to the firebug console as you would expect. However, if you uncomment out the loop and comment out the 3 lines doing it manually, it doesn't work - mousing over any of the divs results in "three" being written to the console. Why are these two methods any different than each other? In each one you use a selector to find the element and add an event to it. <head> <script type="text/javascript" src="/media

Firebug - how can I run multiline scripts or create a new JavaScript file?

半腔热情 提交于 2019-12-07 10:59:00
问题 Is there a way in Firebug to start a new script file to apply to page? Basically I want to do work like I'd normally do on the Firebug console but be able to to paste in multi-line functions, etc. It doesn't seem like the console is amenable to that. 回答1: Down in the lower-right corner of the FireBug UI you should see a red square icon with an up arrow. Use that and stretch it to a size you like. 回答2: maybe not within firebug, but you could try some techniques similar to the jQuery

Trying to locate function in JavaScript files using Firebug

江枫思渺然 提交于 2019-12-07 05:54:01
问题 I'm trying to locate this function call myFooBar() that is referenced inline in some HTML but the page loads tons of JavaScripts and it's quite some work to search that function in each of those files. How can I locate in which JavaScript file this function lives using Firebug? 回答1: Open the Script tab. Type your function name in search box at top right of firebug (see spyglass). You can use the next and previous buttons to jump between occurrences of the function. The file name appears in

firebug - Hide styles from specific .css file

旧街凉风 提交于 2019-12-07 04:13:25
问题 Is there any way that I can hide styles from specific stylesheets in firebug style panel? For example I use CSS reset and include reset.css in my pages but it does not look good when it displays useless information in style window. Thank you. 回答1: I know you are asking about disabling stylesheets with FireBug. You asked two years ago. People suggested to hack FireBug and to use another web dev plugin. Here's my solution: The new Firefox (13.0.1) can do this without a plugin. Just go to web

GM_log and other GM functions don't work in Greasemonkey scripts

心已入冬 提交于 2019-12-07 01:52:16
问题 I have created a "Hello World" Greasemonkey script in Firefox which contains only one line of code: GM_log("Hello World"); This did not seem to function, at least it did not produce any output in my firebug console. The same with other GM_... functions like GM_wait When I replaced: GM_log("Hello World"); with: alert("Hello World") it worked (so the script headers are not the problem). I have also set the following about:config options to true: javascript.options.showInConsole extensions

Assigning console.log to another object (Webkit issue)

折月煮酒 提交于 2019-12-07 00:36:05
问题 I wanted to keep my logging statements as short as possible while preventing console from being accessed when it doesn't exist; I came up with the following solution: var _ = {}; if (console) { _.log = console.debug; } else { _.log = function() { } } To me, this seems quite elegant, and it works great in Firefox 3.6 (including preserving the line numbers that make console.debug more useful than console.log ). But it doesn't work in Safari 4. [Update: Or in Chrome. So the issue seems to be a

“Copy location with parameters” for Google Chrome Developer Tools?

一曲冷凌霜 提交于 2019-12-06 23:32:13
问题 Is there a way in Google Chrome Developer tools to copy an AJAX request with the parameters? Firebug has this feature to "Copy location with parameters" for any async request and it is extremely useful. 回答1: For those still looking after all these years, Chrome's "Replay XHR" is as close as you get. Debugger -> Network -> XHR -> right-click on request -> Replay XHR The output can be seen in "Response" tab when you click on the new replayed request. If someone else finds a way to neatly copy

jquery .data not visible in firebug?

丶灬走出姿态 提交于 2019-12-06 20:29:23
问题 I can use the jquery .data attribute and an alert confirms that it worked, but I don't see data attribute in page using firebug. $('#something').data('foo', 52); alert($('#something').data('foo')); 回答1: The information put into .data(...) is not a visible DOM attribute. You can view an object's data by doing console.log($('#something').data()); Demo: http://jsfiddle.net/maniator/pQybU/ 回答2: jQuery doesn't actually add a data attribute as such to the element and so there is nothing in the DOM

How can I get Firebug to step-through inline javascript code?

杀马特。学长 韩版系。学妹 提交于 2019-12-06 19:29:52
问题 When my javascript code is contained in a HEAD block in my HTML file, it seems I can't set a breakpoint on it to debug it. How can I do this? alt text http://www.deviantsart.com/upload/mhmbha.png this is what I see under the script tag: alt text http://www.deviantsart.com/upload/17g116c.png alt text http://www.deviantsart.com/upload/irki5p.png alt text http://www.deviantsart.com/upload/mts9hn.png Odd: when I take the javascript block OUT of my HTML <head> area, then the .htm page appears

Firebug is stopping even where no breakpoint is set

帅比萌擦擦* 提交于 2019-12-06 16:52:33
问题 I'm using Firebug to debug javascript. It keeps breaking at heaps of places even though there are no breakpoints set. So, I find myself playing through about 30 places in the jQuery library where the debugger is stopping. I've probably accidentally set some setting to a value to make it do this. It is not the yellow pause button. Does anyone recognise this symptom. How can I go back to productively debugging javascript, so that it only stops at breakpoint set by me? 回答1: I have found the