Closed Bug 1913079 Opened 7 months ago Closed 6 months ago

"Break on: attribute modification" state gets lost after a reload

Categories

(DevTools :: Inspector, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1571907

People

(Reporter: dholbert, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

STR:

  1. Load attached testcase.
  2. Open DevTools inspector.
  3. Right-click the <html> element (and/or parentElem, and/or childElem) and choose "Break on: attribute modifications"
  4. Reload the page.

ACTUAL RESULTS:
The "break on attribute modifications" state gets lost on reload. Specifically, the breakpoint > buttons aren't shown in the inspector, and we don't break when attributes get dynamically added to these elements (shortly after pageload).

EXPECTED RESULTS:
The "break on attribute modifications" state should get preserved on reload, and we should break when the attributes get dynamically added (shortly after pageload).

Firefox 131.0a1 (2024-08-12) (64-bit) gives ACTUAL RESULTS.
Chrome 129.0.6643.2 (Official Build) dev (64-bit) gives EXPECTED RESULTS.

Sorry if this is a dupe; I think this is a longstanding bug, so it's probably already filed or at least known somewhere. I'm filing because this makes it harder to debug WebCompat issues that manifest at (or shortly after) page-load time, where investigating the issue requires having such breakpoints set to watch dynamic modifications that happen shortly after pageload.

Attached file testcase 1

(In reply to Daniel Holbert [:dholbert] (mostly-away until Aug 19) from comment #0)

Chrome 129.0.6643.2 (Official Build) dev (64-bit) gives EXPECTED RESULTS.

Specifically, Chrome handles this as-expected for the root element and for parentElem -- the elements that are in DOM up-front -- but they don't preserve the breakpoint for the dynamically-appended childElem.

As you said, might be a dupe, but can't find the original bug. To fix this we can rely on xpath to set our breakpoints and persist this across reloads.
Will need to decide if we should still clean the state when navigating to other pages (domains?). Eg if you set a breakpoint on body, it will match on any page, but that might be annoying.

Severity: -- → S3
Priority: -- → P2
Status: NEW → RESOLVED
Closed: 6 months ago
Duplicate of bug: 1571907
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: