Closed Bug 1755736 Opened 3 years ago Closed 3 years ago

Introduce a test to cover an original source being removed and replaced in the bundle/generated source by a new original source

Categories

(DevTools :: Debugger, task)

task

Tracking

(firefox99 fixed)

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

This usecase isn't covered by any test while this might be a common thing happening when using webpack.
The actual behavior of the debugger is quite unknown.
Thanks to this test, we can see that breakpoints set on the removed original file are still hit if the bundle sources are still run. The UI will update the breakpoint as if it was set against the new original source.

I'm using a new dedicated bundle here so that we ensure that the bundle lines don't change and stay "breakable".
Otherwise the breakpoint wouldn't be hit on reload if the breakpoint become an empty line.
My goal here is to see what happens if the new bundle still hit the breakpoint even if the original source
was removed.

We might later revisit this behavior to remove this breakpoint.
It might be challenging to avoid hitting the breakpoint once on the first load.
It would require the server to know about sourcemap in order to ignore the breakpoint on early page load sequence.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED

This helps stop doing a loose search and avoid bugs where
findSource("original.js") would match both original.js and replace-original.js.

Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bf3f87846256 [devtools] Make findSource debugger helper expect a filename instead of URL. r=bomsy https://hg.mozilla.org/integration/autoland/rev/bb31441f4fc4 [devtools] Test original source being removed and replaced in the bundle by a new original source. r=bomsy https://hg.mozilla.org/integration/autoland/rev/c8ac9e04a62f [devtools] Test both original and generated sources being removed altogether. r=bomsy
Pushed by mlaza@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/42920d1d4aff [devtools] Update line offsets in browser_dbg-breakable-positions.js according to sourcemaps-reload test page changes. CLOSED TREE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: