Edit javascript code in Firefox
Asked Answered
I

2

9

I know that editing Javascript code in Chrome Developer Tools is possible - but I have not found a similar option in Firefox. Is there any way to edit the Javascript on a page in Firefox?

Interviewer answered 23/7, 2016 at 4:29 Comment(1)
#6657729 Maybe here you will find your solution :)Axiom
C
15

You can only modify your variables, inject more code, change DOM etc at runtime using console.

Firefox, by version 45, doesn't offer a way for the developers to modify the source files in the debugger and persist changes to the disk like Chrome does.

Colour answered 23/7, 2016 at 4:53 Comment(0)
H
1

As of Firefox version 128, you can actually add a local script override.

For this, open the Dev Tools (F12), go to the Debugger tab, Sources subpane, right click the required file and select Add script override. After saving the file locally you will be able to modify it with an editor.

To apply the changes reload the page with Ctrl+Shift+R.

Unfortunately, the override setting does not persist across Firefox restarts.

Herve answered 2/8, 2024 at 11:18 Comment(1)
doesn't work for me! I have the recent version of nightly and the options you said do exist but not taking affect! As if the file I download for modification isn't loaded by the debuggerTucson

© 2022 - 2025 — McMap. All rights reserved.