Closed Bug 1634721 Opened 5 years ago Closed 1 year ago

Stepping accidentally steps into generated source, while original is still open

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(firefox115 fixed)

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: Harald, Assigned: ochameau)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

(Whiteboard: [devtools:relnote])

Attachments

(2 files)

Attached image 2 app.js open

Via https://twitter.com/dev__adi/status/1256140132605767680 , which describes a slightly different issue from what I had; but also ends up in the wrong App.js. I can still see both App.js versions though.

STR:

AR: Eventually I got from the original file https://jlv8r.csb.app/src/App.js to a different https://jlv8r.csb.app/src/App.js (generated file), opened in a new source tab.
ER: Debugger should stay laser-focused on the original source, unless I explicitly leave it.

STR II: Even clicking around the call stack and going back to App.js kicks a user back to the wrong generated source.

Priority: P3 → P2

The severity field is not set for this bug.
:jlast, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jlaster)
Severity: normal → S3
Flags: needinfo?(jlaster)

Hi Alex!

This looks related to what you recently fixed in Bug 1829688.
Is this fixed as well or maybe invalid now?

Flags: needinfo?(poirot.alex)
See Also: → 1829688

(In reply to Julian Descottes [:jdescottes] from comment #2)

Hi Alex!

This looks related to what you recently fixed in Bug 1829688.

This sounds opposite to bug 1829688. But still related to the same topic of preserving the state of the currently selected source type between generated and original.

Is this fixed as well or maybe invalid now?

This bug was fixed on current release but regressed on Nightly.
I imagine that when we step-in, we somehow end up on a location with only a generated source (react module) and then consider we are in generated point of view when step-in again on App.js.
This is surprising as we should still select the location when stepping on react...
I'll investigate.

Flags: needinfo?(poirot.alex)

(Also removing source argument on the action as it is redundant with location.source)

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/48abc73003da [devtools] Preserve selected source context (original vs generated), even when stepping through non-source-mapped code. r=devtools-reviewers,bomsy

Backed out for failures on browser_dbg-features-breakable-lines.js

[task 2023-05-11T13:34:04.135Z] 13:34:04     INFO - Wait for Responsive UI to reload
[task 2023-05-11T13:34:04.135Z] 13:34:04     INFO - Waiting on sources: index.html, script.js, original.js, iframe.html
[task 2023-05-11T13:34:04.136Z] 13:34:04     INFO - Finished waiting on sources: index.html, script.js, original.js, iframe.html
[task 2023-05-11T13:34:04.136Z] 13:34:04     INFO - Assert breakable lines of the more complex second load of script.js
[task 2023-05-11T13:34:04.137Z] 13:34:04     INFO - Console message: [JavaScript Error: "Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“default-src”)." {file: "chrome://global/content/customElements.js" line: 500 column: 24 source: "display: none !important"}]
[task 2023-05-11T13:34:04.137Z] 13:34:04     INFO - Console message: [JavaScript Error: "Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“default-src”)." {file: "chrome://global/content/customElements.js" line: 500}]
[task 2023-05-11T13:34:04.138Z] 13:34:04     INFO - Console message: [JavaScript Error: "Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“default-src”)." {file: "chrome://global/content/elements/panel.js" line: 62}]
[task 2023-05-11T13:34:04.138Z] 13:34:04     INFO - Console message: [JavaScript Warning: "Use of nsIFile in content process is deprecated." {file: "resource://gre/modules/NetUtil.jsm" line: 251}]
[task 2023-05-11T13:34:04.139Z] 13:34:04     INFO - Waiting for state change: selected source
[task 2023-05-11T13:34:04.139Z] 13:34:04     INFO - Buffered messages finished
[task 2023-05-11T13:34:04.140Z] 13:34:04     INFO - TEST-UNEXPECTED-FAIL | devtools/client/debugger/test/mochitest/browser_dbg-features-breakable-lines.js | Test timed out - 
[task 2023-05-11T13:34:04.140Z] 13:34:04     INFO - Removing tab.
[task 2023-05-11T13:34:04.140Z] 13:34:04     INFO - Waiting for event: 'TabClose' on [object XULElement].
[task 2023-05-11T13:34:04.141Z] 13:34:04     INFO - Got event: 'TabClose' on [object XULElement].
[task 2023-05-11T13:34:04.141Z] 13:34:04     INFO - Tab removed and finished closing
[task 2023-05-11T13:34:04.142Z] 13:34:04     INFO - GECKO(1470) | JavaScript error: , line 0: NotFoundError: No such JSWindowActor 'DevToolsFrame'
[task 2023-05-11T13:34:04.142Z] 13:34:04     INFO - GECKO(1470) | JavaScript error: , line 0: NotFoundError: No such JSWindowActor 'DevToolsFrame'
[task 2023-05-11T13:34:04.142Z] 13:34:04     INFO - Console message: [JavaScript Error: "NotFoundError: No such JSWindowActor 'DevToolsFrame'"]
[task 2023-05-11T13:34:04.143Z] 13:34:04     INFO - Console message: [JavaScript Error: "NotFoundError: No such JSWindowActor 'DevToolsFrame'"]
[task 2023-05-11T13:34:04.143Z] 13:34:04     INFO - TEST-PASS | devtools/client/debugger/test/mochitest/browser_dbg-features-breakable-lines.js | The main process DevToolsServer has no pending connection when the test ends - 
Flags: needinfo?(poirot.alex)
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e8701ebc31ad [devtools] Preserve selected source context (original vs generated), even when stepping through non-source-mapped code. r=devtools-reviewers,bomsy
Regressions: 1832844
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch

== Change summary for alert #38341 (as of Mon, 15 May 2023 00:31:14 GMT) ==

Regressions:

Ratio Test Platform Options Absolute values (old vs new)
12% damp simple.jsdebugger.open.DAMP windows10-64-shippable-qr e10s fission stylo webrender-sw 535.36 -> 597.12
10% damp cold.jsdebugger.open.DAMP windows10-64-shippable-qr e10s fission stylo webrender-sw 634.60 -> 694.97
9% damp simple.jsdebugger.open.DAMP linux1804-64-shippable-qr e10s fission stylo webrender-sw 642.10 -> 699.32
9% damp complicated.jsdebugger.open.DAMP windows10-64-shippable-qr e10s fission stylo webrender-sw 901.29 -> 980.90
8% damp simple.jsdebugger.open.DAMP linux1804-64-shippable-qr e10s fission stylo webrender 662.80 -> 717.72
8% damp cold.jsdebugger.open.DAMP linux1804-64-shippable-qr e10s fission stylo webrender 770.26 -> 828.42
7% damp complicated.jsdebugger.open.DAMP linux1804-64-shippable-qr e10s fission stylo webrender-sw 1,120.39 -> 1,203.43
7% damp complicated.jsdebugger.open.DAMP linux1804-64-shippable-qr e10s fission stylo webrender 1,153.32 -> 1,231.88
5% damp browser-toolbox.debugger-ready.DAMP windows10-64-shippable-qr e10s fission stylo webrender-sw 1,207.57 -> 1,271.12
3% damp browser-toolbox.debugger-ready.DAMP linux1804-64-shippable-qr e10s fission stylo webrender 1,457.06 -> 1,506.25
3% damp browser-toolbox.webconsole-ready.DAMP linux1804-64-shippable-qr e10s fission stylo webrender 535.01 -> 549.95

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
20% damp simple.jsdebugger.close.DAMP linux1804-64-shippable-qr e10s fission stylo webrender 40.74 -> 32.66
6% damp simple.jsdebugger.reload.DAMP windows10-64-shippable-qr e10s fission stylo webrender-sw 251.05 -> 236.07
2% damp simple.jsdebugger.reload.DAMP linux1804-64-shippable-qr e10s fission stylo webrender 290.68 -> 283.48

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=38341

Flags: needinfo?(poirot.alex)
Whiteboard: [devtools:relnote]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: