[Webkit-unassigned] [Bug 142914] New: Web Inspector: Add Function Breakpoints/Tracepoints (like Symbolic Breakpoints)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 20 11:50:02 PDT 2015


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

            Bug ID: 142914
           Summary: Web Inspector: Add Function Breakpoints/Tracepoints
                    (like Symbolic Breakpoints)
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Inspector
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: joepeck at webkit.org
                CC: graouts at webkit.org, joepeck at webkit.org,
                    jonowells at apple.com, mattbaker at apple.com,
                    nvasilyev at apple.com, timothy at apple.com,
                    webkit-bug-importer at group.apple.com

* SUMMARY
Add Function Breakpoints/Tracepoints (like Symbolic Breakpoints).

Often something you want to do is "pause when window.focus is called", or "do a console.trace every time Element.prototype.querySelector is called". It is possible to swizzle these functions out and get the functionality but that is cumbersome and doesn't play well with the inspector.

It would be awesome if you could create a function breakpoint in Web Inspector's UI. Or via the console like `debug(window.focus)` or `trace(Element.prototype, "querySelector")` which would show up as a Breakpoint in Web Inspector and managed by Web Inspector. We may be able to avoid swizzling if the feature is in the engine.

By having Web Inspector know about and manage these function breakpoints it has the opportunity to persist the breakpoints, carry them forward through navigations so you don't need to re-set them, and apply them to sub-frames automatically.
- If the function breakpoints is set on a Native Function that is not a JSBoundFunction, then e should be able to restore the breakpoint immediately after navigation (when the global object is cleared).
- Tricky with native getters/setters (Object.getOwnPropertyDescriptor(MouseEvent.prototype, "altKey").get) but that could be made to work.

* NOTES
Existing snippets that do things like this:
- https://github.com/NV/captureCalls.js
- https://gist.github.com/NV/5376464
- https://github.com/paulirish/break-on-access

-- 
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/20150320/5e15e30e/attachment-0002.html>


More information about the webkit-unassigned mailing list