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

Issue 682293 link

Starred by 4 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Feature



Sign in to add a comment

Conditional DOM modification breakpoints

Project Member Reported by rbyers@chromium.org, Jan 18 2017

Issue description

Chrome Version       : 57.0.2950.4

Often when debugging a site compat issue (eg. comparing behavior between one browser that works and one that doesn't) I need to break when a particular node is added to the DOM.  This doesn't appear possible in devtools today.  I can have conditional source code breakpoints (i.e. break on a line only when a particular document.getElementById expression evaluates true), and I can have DOM modification breakpoints (when when any node is added) but not conditional DOM modification breakpoints :-(

Easy to add perhaps?
 

Comment 1 by ovkadu...@gmail.com, Jan 18 2017

I would really love to have that feature. I would make debugging much more easier.
However you can use it right now. To work around you can use Mutation events.

Check out this jsfiddle: http://jsfiddle.net/ovkadurin/j6twwym5/
In there I catch the case when the inserted element is <a> and its text is "hello".
In order to use it without any changes in the source code you should use snippets.  

Comment 2 by ovkadu...@gmail.com, Jan 18 2017

* It would make debugging much more easier.

Comment 3 by ovkadu...@gmail.com, Jan 18 2017

Here is a link to the jsfiddle that doesn't contain event listener in its source code https://jsfiddle.net/ovkadurin/m3huyjkn/
Instead insertion event is listened using Snippets. You can also check out animated gif in the attachment.
conditional_dom_bp.gif
1.1 MB View Download
Cc: tkonch...@chromium.org
Status: Untriaged (was: Unconfirmed)
Confirming the issue as this seems to be a feature request.

Waiting for more inputs on this

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

Owner: kozyatinskiy@chromium.org
Status: Assigned (was: Untriaged)
Owner: kozy@chromium.org

Sign in to add a comment