cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
SmartBastard
New member
Status: In development

In Chrome, there's an option "Enable Local Overrides" (while in inspector). When switched ON, we can edit, remove and inject JS lines to the files that are hosted with the website and/or we can add our files with custom JS code. Thanks to that, we as developers could debug JS code on the site. That's the only reason why I can't switch to Firefox on 100%.

12 Comments
Status changed to: New idea
Jon
Community Manager
Community Manager

Thanks for submitting an idea to the Mozilla Connect community! Your idea is now open to votes (aka kudos) and comments.

Honza
Employee
Employee

100% agreed, this is great feature and we are currently working on it (or at least light way version of it)

Bug 1704690 - Local HTTP Response Overrides

Honza

Honza
Employee
Employee

Btw. what is the use case for you? Are you debugging foreign web site? Or your own local site?

Status changed to: In development
Jon
Community Manager
Community Manager

Hey all,

Good news...

This idea was shared with our DevTools Engineering team, and we're excited to report back that it is being worked on. Check out @Honza's comment in the thread for more info and stay tuned for updates 😀

 

Killercat103
Strollin' around

This idea was shared with our DevTools Engineering team, and we're excited to report back that it is being worked on.


That's great! Excited to see it when it becomes available

jcubic
New member

It would be great to have this. I was searching for DevTools Overwrite in Firefox and sadly found only this idea.

johnkegd
New member

Please add this to firefox. I don't think we have to explain how this could be useful.

johnkegd
New member

Please add this feature. I don't think we have to explain how is this is useful

Honza
Employee
Employee

This feature is already available.

1) Load your page

2) Open DevTools and select the Debugger panel

3) Right click on a JS source file in the Sources (left) side panel and execute "Add script override" 

The "Save As" dialog should allow you to save the file locally. This local file will be utilized when an HTTP request is made (for example, when you reload the page). You can modify this file to test various scenarios.

Please try it and let us know how it works for you.

Thank you!

cganoe
New member

Does this feature work under remote debugging (about:debugging), for example Firefox for Android over USB to desktop Firefox? When I'm remote debugging on the desktop, I see the "Add script override" option in the desktop debugger, and it partially appears to work like it would if I were just on desktop (I can save the file, and it shows the purple dot next to the JavaScript file), but my edited code does not show in the debugger, and my local code changes don't appear to be getting to the mobile device. I'm guessing it doesn't work for remote debugging, which is unfortunate, unless I'm missing a step. Thanks for this great feature.