[Webkit-unassigned] [Bug 272916] New: Web Inspector: JavaScript breakpoint on a line with just a semicolon doesn't get triggered

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 18 13:09:42 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=272916

            Bug ID: 272916
           Summary: Web Inspector: JavaScript breakpoint on a line with
                    just a semicolon doesn't get triggered
           Product: WebKit
           Version: Other
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Inspector
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: qianlangchen at apple.com
                CC: inspector-bugzilla-changes at group.apple.com

Let's say you have the following simple JavaScript file:
    let s = "hello";
    ;
    console.log(s);

In Web Inspector's sources tab, if you create a breakpoint on line 2 (the line with just a semicolon), that breakpoint never gets triggered.

However, if that line had some other no-ops like `42;`, `() => {};`, or even if it's just an empty line, the breakpoint does get triggered.

   - My guess is that the line `;` gets optimized out or something so it's ignored, but the empty line instead registers the breakpoint on the next useful line (the line with `console.log`).

See attached for a video demo.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240418/8696f2bd/attachment.htm>


More information about the webkit-unassigned mailing list