firefox-developer-tools

How to enable debuging when using jpm run to test a Firefox Add-on SDK extension

[亡魂溺海] 提交于 2019-12-12 01:42:48
问题 Can somebody tell me what is required to turn on a debugger when testing a Firefox Add-on SDK extension on Windows 7, 64 bit. I'm launching the add-on via the command line with the command jpm run . I've tried bring up the debugger via F12 . But, I can't see my JavaScript file(s) there. A step-by-step guide would be useful. 回答1: Use the command jpm run --debug. Then click on "OK" when asked to accept the incoming connection: ? You will then have a debugger window from which you can select

What is causing the syntax error I see in Firefox developer console?

三世轮回 提交于 2019-12-11 17:52:25
问题 Attached is a screenshot of the developer console. I see a syntax error in a closure definition. I've a JavaScript file, which has the following function. I'm loading the JavaScript file from another function and calling sampleFunction() from it. var sampleFuntion=function(obj){ //Statement here; }; But Firefox shows a syntax error for the first line, which is the function declaration/definition. I'm using Mozilla Firefox 29.0.1 on Windows 7. What is the actual error in the code? 回答1: As the

Open Firefox network before page is opened

左心房为你撑大大i 提交于 2019-12-11 15:35:52
问题 I'm using Firefox and want to analyses the request/response of a page. Is there a way to open the Developer tools (firefox-developer-tools) - namely "Network" - before entering/opening the page (Automatic opening second tab). Otherwise it would not be possible to track the traffic correct. 回答1: As far as I know there is no option/config for doing that (as of v65), but you can do that with --devtools flag (https://bugzilla.mozilla.org/show_bug.cgi?id=1226744), sadly there is some limitations:

Where can I find the real memory use of a page (including images and multimedia)?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 13:19:33
问题 I noticed something odd in the Memory inspector of both Chrome and Firefox. On a large page, it will tell you how much various JavaScript objects take up, but doesn't seem to list any image/multimedia objects. In fact, in this screenshot taking from the Profiles panel in Chrome's DevTools you can see most of the memory isn't in what it reported. (You can see this even on this page, going to Profiles -> Take Heap Snapshot, selecting Statistics from the top dropdown.) Is there a more proper way

Firefox addon error in scratchpad

ε祈祈猫儿з 提交于 2019-12-11 03:09:09
问题 I am trying to test this code here. This code "blocks" some URL if I try to join them. //const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components; Cu.import('resource://gre/modules/Services.jsm'); var urls_block = [ //If URLs contain any of these elements they will be blocked or redirected, // your choice based on code in observer line 17 'www.facebook.com' ]; var redir_obj = { 'www.facebook.com': 'data:text,'+ escape('url_blocked would have went to facebook') } var observers

Debugging CSS animation performance on Firefox

∥☆過路亽.° 提交于 2019-12-10 17:29:48
问题 We recently run into a Firefox-specific performance issue when doing CSS-based animation (dropped frames), in Chrome we can easily debug with Timeline tab, but is there similar tool that works for Firefox? Preferably for both Firefox desktop and mobile, as the issue is most severe on our android device. 回答1: As of Firefox 34, there's a profiler in the FirefoxDevTools: The Profiler lets you record JavaScript function calls. You can find the profiler in the "performance" tab in the toolbox

Calculating and verifying Time To First Byte (TTFB)

送分小仙女□ 提交于 2019-12-10 11:15:08
问题 I was given the following formulas to measure Time To First Byte (TTFB), TTFB to DOM Ready and Page Load. TTFB window.performance.timing.responseStart - window.performance.timing.navigationStart TTFB to DOM Ready window.performance.timing.domComplete - window.performance.timing.navigationStart Page Load window.performance.timing.loadEventStart - window.performance.timing.navigationStart Are these formulas correct? And how would I be able to check them? I've heard you can measure them in

How do I debug jQuery events using Firefox debugger?

喜夏-厌秋 提交于 2019-12-10 10:43:13
问题 I've been wracking my brain over this and cannot figure it out for the life of me. Here's a test page I built for the sake of this discussion: http://jsbin.com/garokalocu Let's assume this page is very complex and I didn't build it, and I'm trying to see the code that runs when the user clicks "Do It." So I open the debugger, open the side pane and click "Events." I checkmark the click event for #execute which is the button. Now I click the button, and the code hits the breakpoint. But

Browser Inspector how to know if image or other resources belongs to which css or js file that was failed to load?

别来无恙 提交于 2019-12-10 10:28:49
问题 I can see some images in my webpage that are not loading the reason is the wrong path inside the css or js file but how to know which js or css file is trying to load that resource. I tried too much in browser's inspector to find some way but I cannot figure out so I have to search each js and css file for the resource name. Is there any way to know the exact js or css file that is trying to load the failed resource. Thanks 回答1: The Firefox and the Chrome DevTools provide a way to see what

Why copy function is not working inside setTimeout?

丶灬走出姿态 提交于 2019-12-10 03:59:52
问题 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