Issue metadata
Sign in to add a comment
|
[Feature Request]DevTools: support to add DOM/BOM prototype method based breakpoints
Reported by
ctengc...@gmail.com,
Jan 20 2017
|
||||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 Steps to reproduce the problem: 1. As a custom embedder dev, sometimes i need to fix a site compatibility problem, which is mobile only, but employs complex huge script loading; 2. I know these scripts MUST call a specific DOM/BOM API, and i hope to add a breakpoint on this method 3. What is the expected behavior? Can add DOM/BOM prototype method based breakpoints What went wrong? The current DevTools breakpoints seems to be based on event listenrs? This is a special "First Statement of Each Script" type breakpoint, which i can step over all the scripts loaded with the site, but i hope is i can directly add a DOM/BOM prototype method based breakpoint, that would be better. Did this work before? N/A Chrome version: 55.0.2883.87 Channel: stable OS Version: 10.0 Flash Version: Shockwave Flash 24.0 r0
,
Jan 23 2017
Tagging as Feature request and latest canary milestone for more inputs on this.
,
Jan 23 2017
ctengctsh@ Thank you for your response, this seems like to be a feature request, adding the untriage label so that issue can get addressed.
,
Jan 30 2017
,
Jan 30 2017
Currently in console we support methods like debug(foo) and monitor(foo). By first method you can add a breakpoint to the function, by second get message in console about each call to method. We can support native methods in these methods. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by caseq@chromium.org
, Jan 20 2017Not sure if this needs to be supported by core DevTools -- you could have a snippet like: function intercept(protoClass, method) { var original = protoClass[method]; protoClass[method] = function() { debugger; original.apply(this, arguments); } }