firefox-developer-tools

How to prevent Firefox DevTools from showing “Source Map not found” errors?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 06:02:06
I am using a couple of 3rd party minified Javascript files that have no .map file. When I am debugging in Firefox DevTools, it consistently shows these errors: Source map error: request failed with status 404 Resource URL: https://foo.domain.com/widgets/widgets.min.js Source Map URL: widgets.min.js.map This is really distracting since there are a number of these files and they really pollute the console. Is there anyway to turn these warnings off? You can disable source maps globally by going into the Toolbox Options of the Developper Tools and unchecking Enable Source Maps . You can also

Why copy function is not working inside setTimeout?

浪子不回头ぞ 提交于 2019-12-05 04:53:17
Chrome complains when I try to copy inside setTimeout . setTimeout(function () { copy('a') }, 0) Uncaught ReferenceError: copy is not defined at <anonymous>:1:26 It doesn't work with the window scope as well. setTimeout(function () { window.copy('a') }, 0) Uncaught TypeError: window.copy is not a function Interestingly, if I keep the reference to copy and reuse it, it works cc = copy; setTimeout(function () { cc('a') }, 0); In Firefox, it doesn't throw any error, but it doesn't work even with the saved reference. Why copy function doesn't work inside setTimeout , is it a bug? copy is part of

How to access add-on content script in Firefox console?

孤者浪人 提交于 2019-12-04 04:59:09
I have developed an add-on for Firefox and Chrome. It has content scripts. I want to access them in the browser tab's console (on Firefox the Web Console ). For example, I want to enter a global variable defined in the content script(s) in the console, and it will output its value. In Chrome, I can open the console by pressing F12 , then navigate to the Console tab in the developer tools. It has a dropbox, right after the filter button, to select which context I am in (page/content script): In Firefox, how to do the same thing? Makyen The ability to change the context/scope of the Web Console

Firefox developer tools adding a new rule?

时间秒杀一切 提交于 2019-12-04 03:38:21
问题 I decided to try out the built in Firefox Developer Tools. Seems to be nice, but... I can't find out how to add a new rule to the CSS from Inspector/Rules. By that I mean ".my-new-rule" not just the "element" rule that is open by default. FINAL EDIT: This is now possible with the latest Firefox update. 回答1: Update: As of FF 33.00 it is now possible to add new CSS rules using the inspector! It is not possible to use the inspector to create new CSS rules with out a browser add-on (see comment

How to force Firefox to open devtools on each tab?

☆樱花仙子☆ 提交于 2019-12-04 01:46:18
Is there any way how to enable opening of devtools on all new tabs? I'd like to have devtools opened to be able to comfortably debug popup windows. Chrome added the option to "Auto-open DevTools for popups" in early 2016. I'm seeing the option in Chrome 51. Open DevTools Hit F1 to open settings Scroll all the way to the bottom, and the option is under "DevTools" Not sure about Firefox at the moment, but I could not find anything that could lead to a positive response. Dmitry Kulikov has developed a plugin for Firefox that does exactly this. You can find it here: https://github.com/dmitry

How do I refresh in Firefox and preserve breakpoints?

烈酒焚心 提交于 2019-12-04 01:20:41
I am debugging javascript in Firefox Aurora Developer Tools. I set a breakpoint in a javascript file, and refreshed the page, after which all my breakpoints went away. How do I preserve breakpoints in Firefox developer tools when I refresh the page? This sounds like a regression; breakpoints should stay active across page refreshes. Can you share the code you are working with (or a minimal test case) and give some steps to reproduce the lost breakpoints? Firebug. But I'm not sure if it works properly with Aurora The breakpoints stay highlighted across refreshes, but fail to break.. restarting

Best way to detect when a function is called from the console

删除回忆录丶 提交于 2019-12-03 20:41:48
I would like to know the best way to detect when a method or function is directly called through the console. As far as I currently understand, it's not possible to directly detect it on identical function calls, but using the .call() and .apply() methods of a function I can pass additional data through the this object. Given the following code structure: (function(){ var Player = {money: 0}; window.giveMoney = function(amount){ if (this.legit !== true) throw new Error("Don't try to cheat!"); Player.money += amount; } })(); I could call the function using window.giveMoney.call({legit: true},

Why transferred bytes are bigger than size bytes in firefox dev tools?

孤人 提交于 2019-12-03 16:31:46
问题 I am measuring the performance from a website. When looking at the firefox-developer-tools, I noticed a weird behavior. There is a specific JS file which the transferred size is 2,831.54 KB, but the actual size is 1280kb. According to Mozilla, the Transferred size should be smaller or equals to Size: Transferred (new in Firefox 38) : the number of bytes that were actually transferred to load the resource. This will be less than Size if the resource was compressed. Size : the size of the

Increase code font size in firefox developer tool

此生再无相见时 提交于 2019-12-03 02:42:14
问题 How to increase code fonts in Firefox developer tools? I know that there is a zoom function but I want to set the font size only for the code. 回答1: You need to modify userChrome.css under ~/.mozilla/firefox/[profile-name]/chrome with this: /* Styles for Web developer tools */ @namespace url(http://www.w3.org/1999/xhtml); .CodeMirror { font-family: "Ubuntu Mono", monospace !important; font-size: 15pt !important; } The result looks like this: This only changes the debugger and style editor.

What unique features does Firebug have that are not built-in to Firefox?

雨燕双飞 提交于 2019-12-03 00:30:00
问题 I just cleaned my Firefox addons and wondered: Which features does Firebug have that make it unique? Which features are available in both Firebug and the Firefox Developer Tools? 回答1: Firefox's native developer tools have come a long way since this question was written. The differences have mainly reduced to the following points: Can't stop the script execution on DOM mutations, XHRs, or cookie changes. XPaths can't be copied. Missing an events side panel in the Inspector (though events are