firebug

How can I set breakpoints in an external JS script in Firebug

风流意气都作罢 提交于 2019-11-27 20:44:17
问题 I can easily set breakpoints in embedded JS functions, but I don't see any way of accessing external JS scripts via Firebug unless I happen to enter them during a debug session. Is there a way to do this without having to 'explore' my way into the script? @Jason: This is a good point, but in my case I do not have easy access to the script. I am specifically talking about the client scripts which are invoked by the ASP.Net Validators that I would like to debug. I can access them during a debug

How to debug web workers

▼魔方 西西 提交于 2019-11-27 19:57:44
I have been working with web workers in HTML 5 and am looking for ways to debug them. Ideally something like the firebug or chrome debuggers. Does anyone have any good solution to this. with no access to the console or DOM its kind of hard to debug iffy code As a fast solution on the missing console.log, you can just use throw JSON.stringify({data:data}) Dev Channel version of Chrome supports debugging of workers by injecting fake workers implementation that simulates workers using an iframe within worker's client page. You will need to navigate to Scripts pane and tick Debug checkbox on

Load javascript via Firebug console

人盡茶涼 提交于 2019-11-27 19:50:55
问题 How can I load a javascript file via Firebug console ? This would be useful in development, so I don't have to modify the html code to load the script. 回答1: var script = document.createElement("script"); script.src = "http://whatever.com/js/my/script.js"; document.body.appendChild(script); 回答2: A very handy command is include(); include("http://code.jquery.com/jquery-latest.min.js"); Read more about include() command 回答3: Just ran into the same problem, and - as jQuery is used in the project

How can I inspect disappearing element in a browser?

天大地大妈咪最大 提交于 2019-11-27 19:46:07
问题 How can I inspect an element which disappears when my mouse moves away? I don't know it's ID, class or anything but want to inspect it. Solutions I have tried: Run jQuery selector inside console $('*:contains("some text")') but didn't have any luck mainly because the element is not hidden but probably removed from the DOM tree. Manually inspecting DOM tree for changes gives me nothing as it seems to be just too fast to notice what have changed. SUCCESS: I have been successful with Event

js override console.log if not defined

左心房为你撑大大i 提交于 2019-11-27 19:22:15
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); Neither, but a variation of the second. Lose the try...catch and check for existence of the console object properly: if (typeof

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

 ̄綄美尐妖づ 提交于 2019-11-27 18:54:36
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 2009!) mentions this capability exists in the IE dev tools, but I'm currently using Mac OS, so this is

Firebug: How to inspect elements changing with mouse movements?

天涯浪子 提交于 2019-11-27 17:34:44
Sometimes I need to inspect elements that are only showing up on a page if you put mouse over some area. The problem is that if you start moving mouse towards firebug console in order to see the changes, mouse-out event is triggered and all changes I am trying to inspect disappear. How to deal with such cases? Basically I am looking for something that would either: Switch to firebug console without moving a mouse (using keyboard shortcuts maybe? But I can't figure out how to use firebug with keyboard only) Have an ability to "freeze" the page so your mouse movements don't trigger any events

How to debug CSS/Javascript hover issues

怎甘沉沦 提交于 2019-11-27 17:22:30
I often find myself wanting to debug CSS layout issues that involve DOM changes caused by Javascript in reaction to a hover event or different CSS rules applying due to the :hover selector. Normally, I'd use Firebug to inspect the element that's giving me trouble and see what its CSS properties were, and where those properties come from. However, when hovering is involved, it becomes impossible, because as soon as you move your mouse down to the Firebug panel, the elements you're interested in are no longer hovered, the CSS rules that apply are different, and (in the case of JS hovers) the DOM

What can cause a persistent “Reload the page to get source for” error in firebug?

爱⌒轻易说出口 提交于 2019-11-27 17:14:29
问题 I'm trying to debug the javascript of a specific page, and I keep seeing Reload the page to get source for page.htm in Firebug. On Chrome, I'm mostly able to debug the js, but sometimes I also get a blank page. What can cause such issues? I believe I always see a blank page in Chrome if I reload while the JS console is open. If I open a new Chrome tab, load the page, and then open the JS console, everything is ok. The page I'm debugging is on a localhost server (Play Framework server),

Breaking JavaScript execution always when cookie is set

依然范特西╮ 提交于 2019-11-27 16:49:14
问题 Is it possible to break javascript execution in FireBug (or in some other web developer tool) always when cookie is set (without setting JS breakpoints explicitly)? document.cookie = '...'; Harri 回答1: This should work (run it in a console): origDescriptor = Object.getOwnPropertyDescriptor(HTMLDocument.prototype, 'cookie'); Object.defineProperty(document, 'cookie', { get() { return origDescriptor.get.call(this); }, set(value) { debugger; return origDescriptor.set.call(this, value); },