Closed Bug 1704690 Opened 3 years ago Closed 1 year ago

Local HTTP Response Overrides

Categories

(DevTools :: Debugger, enhancement, P3)

Firefox 87
enhancement

Tracking

(firefox112 fixed)

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: cqfllp, Assigned: ochameau)

References

(Depends on 3 open bugs, Blocks 4 open bugs)

Details

Attachments

(2 files, 2 obsolete files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0

Steps to reproduce:

-Open Developer Console
-In Debugger tab, if I want to modify a page's source file, I expected to directly modify any file, including js files, and save the changes to take effect on its next page refresh.

I also mentioned this issue on the forum. And one reply suggested me to submit a feature request here:
https://support.mozilla.org/en-US/questions/1331771

Actual results:

I have recently switched from Chrome to Firefox. All features that I used in Chrome seem to exist in Firefox as well, until I found out that there are no local overrides in Firefox?
Some Information about this feature(it firstly appeared in Chrome's dev build in 2017):
https://www.youtube.com/watch?v=7-XnEMrQnn4&t=251s

Expected results:

A local override feature similar to Chrome. (I know that it might seem like a copycat to Chrome but I do think this is what a browser debugger should be able to do in 2021)

I do not envy the privacy attitude with Chrome, that's why I still migrated from there. Personally Firefox would have been a flawless option with this feature added.

The Bugbug bot thinks this bug should belong to the 'DevTools::Debugger' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Debugger
Product: Firefox → DevTools

Thanks for the report!

This feature has been requested in the past (not that easy to implement).

Honza

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3

Not sure if this should be duped against Bug 771339, but it's closely related.

See Also: → 771339

The difference I was seeing (when triaging this) is that Bug 771339 is about live edit while this one is about edit & reload.

Live edit doesn't really make sense to me in terms of js files since most javascript files on a website are executed before its page finishes loading all resources. And Firefox already has a form of "live editing" that changes DOM/CSS. This also differs from an addon called Tampermonkey which only injects userscript into a website instead of doing modification on its vanilla sources.

I forgot to add another point: this feature makes page modifications persist(even with a hard refresh) until the user decides to remove their local changes.

See Also: → 1734799

I too would love this feature in Firefox. However I understand how hard it is to implement it.
As a workaround I have been using extensions like https://addons.mozilla.org/en-US/firefox/addon/resourceoverride/

Duplicate of this bug: 1756306

We'll try to experiment on this, starting with allowing to select a file in the debugger source tree and override it with a local file

Attachment #9306259 - Attachment description: WIP: Bug 1704690 [devtools] Local overrides feature in the debugger → Bug 1704690 [devtools] Local overrides feature in the debugger
Attachment #9306259 - Attachment description: Bug 1704690 [devtools] Local overrides feature in the debugger → WIP: Bug 1704690 [devtools] Local overrides feature in the debugger
Summary: Missing Local Overrides Feature → Local HTTP Response Overrides
Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Attachment #9310647 - Attachment description: Bug 1704690 - [devtools] WIP: override using nsIHttpChannel.redirectTo. → Bug 1704690 - [devtools] Reduced test case to use channel.redirectTo to override request content from local files.
Blocks: 1817050
Attachment #9306259 - Attachment description: WIP: Bug 1704690 [devtools] Local overrides feature in the debugger → Bug 1704690 [devtools] Local overrides feature in the debugger r=ochameau
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/398115c86eed
[devtools] Allow overriding request content with a local file. r=valentin,devtools-backward-compat-reviewers,bomsy,necko-reviewers
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch

Comment on attachment 9306259 [details]
Bug 1704690 [devtools] Local overrides feature in the debugger r=ochameau

Revision D163610 was moved to bug 1818806. Setting attachment 9306259 [details] to obsolete.

Attachment #9306259 - Attachment is obsolete: true
Depends on: 1834799
Depends on: 1834808
Attachment #9315135 - Attachment is obsolete: true
Depends on: 1876060
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: