Links to original files from the inspector go to the generated file at the given line
Categories
(DevTools :: Debugger, defect, P2)
Tracking
(firefox68 fixed)
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: loganfsmyth, Assigned: bhackett1024)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Originally reported by Harald in https://bugzilla.mozilla.org/show_bug.cgi?id=1265327#c9 but I'm going to refile since this seems like a recent regression rather than specifically related to that old issue.
Made a simpler test case: https://amusing-dove.glitch.me/
STR:
Open Devtools
Inspect the first button which has an JS event attached
Click on the "ev" button to see the event popup
Click on "Open in Debugger" icon
I am unsure about this having just edge cases. I have not seen it working for any source mapped case.
Reporter | ||
Comment 1•5 years ago
|
||
Also from Harald:
To clarify:
Inline code preview in the events panel works and shows the correct handler. Resolving the filename and location works and shows the original location.
Clicking the link to the Debugger is what isn't working and send to the wrong file (generated file instead of original) with the correct original location. In the example, the original location of index.js:13 jumps to the generated file client.js:13.
Reporter | ||
Comment 2•5 years ago
|
||
Looks like this was regressed by https://bugzilla.mozilla.org/show_bug.cgi?id=1531826. We always prefer sourceId
if it is available, but we aren't taking into account the fact that an event handler URL could be updated to point to an original file via the sourceMapService. This means that we end up linking to the original line and original URL, but we give the generated sourceId.
Brian, could you look into this since you're familiar with the inspector sourceActor logic?
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
Assignee | ||
Comment 4•5 years ago
|
||
The problem here is that the event tooltip is continuing to use the source actor for an event listener even after modifying its URI for a source map. The patch I just created clears the source actor when the source map service finds an original URL for the generated location. I'll try to write a test for this later.
Assignee | ||
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
Pushed by bhackett@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/21025c2c238d Don't use source actor for event listeners with mapped sources, r=ochameau.
Comment 6•5 years ago
|
||
bugherder |
Description
•