I’ll spare you the long story of why I had to edit a JavaScript file, but today I learned that since Firefox 128 you can add a script override in the browser Debugger Panel. This downloads the JavaScript file in question, where you can edit it with your favourite editor.
- Open DevTools by hitting F12 and select the Debugger.
- Right-click on the JavaScript file in the source list and select “Add script override”.
- Save your file somewhere and edit.
- Reload the page to apply changes.
- Remove the override by right-clicking on the file again and selecting “Remove script override”.


The file I was editing was minified, so Firefox doesn’t save the nicely unminifed file you were looking at, but it’s not too hard to unminify it. It was a small change I was making, so it wasn’t too difficult to find the right place to edit.

Yes, yes, Chrome has been able to do this for a long time, apparently. Thanks for letting me know.