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