我可以在哪里找到gm_xmlhttprequest xhr控制台日志

发布于 2025-02-07 18:33:49 字数 298 浏览 1 评论 0原文

我在Firefox中的Tampermonkey上运行了一些用户标记(Chrome具有相同的行为),

这些请求的XHR日志没有出现在控制台或网络分析中。

因为这是HTTP到HTTP服务的CORS请求,所以我们必须使用gm_xmlhttprequest(),并且不能使用fetch(fetch> fetch() xmlhtttprequest

请求报告有时会出现错误,有时没有错误,因此该信息将非常有帮助解决我们的问题。 我的问题是,我可以在哪里找到这些日志,还是该如何打开它?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一个人的旅程 2025-02-14 18:33:49

GM_XMLHTTPREQUEST()通常是从用户参考管理器的背景脚本运行的。

如以下主题所述,您可以打开相对控制台并选中“网络”选项卡。

无法获得firefox扩展日志以显示

Firefox控制台已分为不同的区域。结果
console.log()可以在相对区域中查看。

  • 多处理浏览器控制台 ctrl+shift+j 主要由Firefox本身登录
  • Web开发人员工具 ctrl+shift+i f12 logs by tab/webpage和addons的内容脚本
  • 扩展工具箱关于:调试#/runtime/this-firefox➜xyzaddon➜histect 通过xyzaddon的背景脚本
  • 登录

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文