Bug 248444

Summary: Web Inspector: iframe breakpoints skipped when there are main frame breakpoints
Product: WebKit Reporter: Jeff Johnson <opendarwin>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: All   
OS: All   
Attachments:
Description Flags
Sample html demonstrating the bug
none
Sample html loaded by iframe none

Description Jeff Johnson 2022-11-28 16:35:59 PST
Created attachment 463773 [details]
Sample html demonstrating the bug

I tested with Safari 16.1 Version 16.1 (17614.2.9.1.13, 17614) and Safari Technology Preview Release 158 (Safari 16.4, WebKit 17615.1.12.110.1) on macOS 12.6.1, as well as with Safari on iOS 16.1.1.

Steps to reproduce:
1. Load the attached sample "test.html"
2. Set a breakpoint at "top breakpoint"
3. Set a breakpoint at "frame breakpoint"
4. Reload the page

Expected results: both breakpoints get hit.

Actual results: "top breakpoint" is hit, but "frame breakpoint" is missed.

Discussion:
If I disable "top breakpoint", then "frame breakpoint" does get hit. Only the presence of the main frame breakpoint causes the iframe breakpoint to be missed.

When I reload the page, I can see one of the breakpoints disappear from the web inspector sidebar. Both both breakpoints still appear in the source.

I actually discovered this bug while working on a Safari extension with "all_frames": true, but I was eventually able to determine that it wasn't an extension-specific bug.
Comment 1 Jeff Johnson 2022-11-28 16:36:29 PST
Created attachment 463774 [details]
Sample html loaded by iframe
Comment 2 Radar WebKit Bug Importer 2022-12-08 12:34:31 PST
<rdar://problem/103141697>