10

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?

1

2 Answers 2

16

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.

Sign up to request clarification or add additional context in comments.

Comments

10

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.

2 Comments

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 debugger
wow, it works. thanks a lot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.