How to debug Greasemonkey/Tampermonkey userscripts with FF 57+ (with WebExtensions)?
Asked Answered
S

1

11

I can't find my userscript(s) in the Browser Debugger's Open file... box (with the name defined at // @name).

It seems that Annarfych's answer and Hjulle's answer to How to debug Greasemonkey script with the Firebug extension? do not work any more.

Because of Michael's findings to Greasemonkey script folder missing?

Apparently GreaseMonkey no longer stores the user scripts in gm_scripts for Firefox. [...] the scripts are apparently stored in an SQLite database file.

Socialist answered 31/7, 2019 at 19:18 Comment(1)
The problem is even worse: even when you find a file using, say, XHR breakpoint and choose Reveal in the tree context item from tab header menu - nothing will show up in the source tree.Keever
H
2

As there is no answer until now:

  • Open DevTools (F12) > Debugger
  • The userscripts for Tampermonkey are stored in the addon folder Tampermonkey > userscripts folder
  • For Greasemonkey the UserScripts are stored in the folder user-script:// > the namespace of the userscript > userscript name
Hammerlock answered 4/10, 2021 at 13:56 Comment(1)
In my FF 92.0.1's DebuggerSources there is a Main-ThreadTampermonkey folder with two files: rea/common.js, content.js and there is no Greasemonkey folder at all. There are folders for other add-ons I have installed: Native MathML, uMatrix, etc.Socialist

© 2022 - 2024 — McMap. All rights reserved.