New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 682991 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 496666
Owner:
Last visit > 30 days ago
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Feature



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 description

UserAgent: 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
 

Comment 1 by caseq@chromium.org, Jan 20 2017

Cc: kozyatinskiy@chromium.org
Not 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);
  }
}

Comment 2 by ajha@chromium.org, Jan 23 2017

Labels: -Type-Bug M-58 Type-Feature
Tagging as Feature request and latest canary milestone for more inputs on this. 
Cc: kkaluri@chromium.org
Status: Untriaged (was: Unconfirmed)
ctengctsh@ Thank you for your response, this seems like to be a feature request, adding the untriage label so that issue can get addressed. 
Owner: lushnikov@chromium.org

Comment 5 Deleted

Mergedinto: 496666
Status: Duplicate (was: Duplo)
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