Closed Bug 1759818 Opened 3 years ago Closed 3 years ago

Can't break on all inlines scripts for iframe's HTML page

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(firefox101 fixed)

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

STR:

AR:
Only one of the two inline <script> have its line "breakable". i.e. you can set a breakpoint.
The other inline <script> is ignored.

ER:
You can set breakpoints on all inline <script>

This is specific to iframe's HTML page and probably relates to this code:
https://searchfox.org/mozilla-central/rev/efc480f2188fb43c9cccdfd2eef79749a19c20a3/devtools/client/debugger/src/client/firefox/create.js#100,112
which will force spawning a new dedicated source object for each individual inline script.
Whereas we expect only one for the html pages.
We do it right for top level target's sources in this makeSourceId method.

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(hmanilla)
Depends on: 1747105
Severity: -- → S3
Flags: needinfo?(hmanilla)
Priority: -- → P3

While adding this new html page for breakable lines,
I revisit how we load same-url.sjs and use this iframe document instead.
This feel more natural than dynamically injecting a document-builder iframe.

Also I promote breakable lines and positions tests to become features tests.

And it looks like adding the iframe target slow things down for the quick open.
So I tuned the related assertion to avoid intermittents.

Last but not least, this patch highlights two limitations for iframe html debugging:

  • only the first inline script is "breakable" (others are ignored)
  • on reload, no content is displayed at all (this is new to me)
Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/13242fc72d38 [devtools] Assert the breakable lines for iframe html pages. r=bomsy https://hg.mozilla.org/integration/autoland/rev/f6ddce73b688 [devtools] Ensure creating one source per URL, even for iframe targets. r=bomsy
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: