How can I inspect disappearing element in a browser?

(This answer only applies to Chrome Developer Tools. See update below.)

Find an element that contains the disappearing element. Right click on the element and apply “Break on… > Subtree Modifications.” This will throw a debugger pause before the element disappears, which will allow you to interact with the element in a paused state.

enter image description here

Update Oct 22 2019: with the release of v. 70, it looks like FireFox finally supports this kind of debugging 2 3:

enter image description here

Update Sep 15 2020: Chrome has an “Emulate a focused page” option (you can get it from the [⌘]+[P] Command Menu, or Global Preferences) for this exact need. 5 – h/t @sulco on Twitter

Leave a Comment