I have a little userscript running on Tampermonkey in Firefox (chrome has the same behavior)
The xhr logs of these requests doesn't appear in the console or network analysis.
Because it is a cors request from https to a http service, we have to use GM_xmlhttpRequest() and cannot use fetch() or normal XmlHttpRequest
The request report sometimes an error and sometimes not, so the information would be very helpful to solve our issue.
My question is, where I can find these logs, or how can I turn it on?
GM_xmlhttpRequest() is usually run from the background script of the userscript manager.
As mentioned in the following topic, you can open the relative console and check the Network tab.
Can't get Firefox extension logs to show up
Firefox console has been divided into different areas. The result of
console.log() can be viewed in the relative area.
Multiprocess Browser Console Ctrl+Shift+J Mostly logs by Firefox itself
Web Developer Tools Ctrl+Shift+I or F12 Logs by Tab/Webpage and Content scripts of addons
Extension Toolbox about:debugging#/runtime/this-firefox ➜ XYZaddon ➜ Inspect Logs by background scripts of XYZaddon
I am writing a chrome extension for a website and I want to be able to read the websocket messages being sent to the website in my chrome extension. I can see the data I need using the network tab from chrome developer tools but am not sure how to access it from the extension.
Well, I am a developer and I recently found that whatever I have written code is been exposed in the google dev tools on pages tab under the source tab. So, what do I do to hide the code?
Here is the problem...
Does anyone know how to get access to the network traffic (requests and responses) caused by a document in a browser window from a xpi Firefox extension, programmatically?
I'd like to use the information you'll see on 'Network' tabs in current browser developer tools (like Firebug or Chrome Dev Tools). Basically, I want to build a Firefox extension that tracks some special web-bugs and do some more analysis on this data.
I've checked the API documentation of the Firefox Addon SDK but I couldn't find the information I was looking for.
Can anyone tell me how this can be accomplished using the Firefox Addon SDK?
Thanks for any hints.
I'm trying to use Firebug to debug a JavaScript file in an extension I've added to Fx 4.
Can anyone tell me how to do it? I can only see website scripts.
Use Chromebug it's firebug for extension development, witch will give you the full ability to inspect debug firefox it self and all firefox extension as if it's a webpage :)
1- install the latest version from here: http://getfirebug.com/releases/chromebug/
2- Winkey+R to open run then type firefox.exe -chromebug this will run firefox with chromebug
3- for more information visit http://getfirebug.com/wiki/index.php/Chromebug
Please see MDN - Building An Extension - Debugging Extensions, which shows what tools Firefox provides you with to natively debug extension, also take a look at Dive Into Greasemonkey - Debugging User Scripts (PDF, p.13) which is aimed more specifically at your request.
Other than that, see How to debug a Greasemonkey script with the Firebug extension?
On Firefox 19 or later, it's possible to use the built-in JS debugger on the browser itself. Go to about:config and set the following two prefs:
devtools.chrome.enabled: true
devtools.debugger.remote-enabled: true
After you restart the browser, you can access the Browser Debugger through Tools > Web Developer > Browser Toolbox.
(note that you must accept the incoming connection)
See more at: https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/Debugging_JavaScript#JavaScript_Debugger
In the bottom right hand corner there should be a little Firebug icon. Single or double click to open then you see some tabs at the top. Click the "Console" tab for real time debugging, or the "SCript" tab to view the scripts that have been loaded. Note, you can also load CSS and HTML through Firebug, use the "Viewer" icon to view HTML code on the page in real time.