Help us make DevTools Tips better! Fill out this survey to tell us more about your DevTools habits and frustrations.
Capture node creation stack traces
It turns out there is a way to do this automatically without having to set breakpoints in the code at all. It is a hidden experiment for now so you will need to first enable it in Chrome or Edge.
Go through the following steps once to enable the experiment:
- Go to the DevTools settings (press F1, or use the gear icon in the toolbar)
- Go to the Experiments tab
- Check the Capture node creation stacks box
- Reload DevTools
Make sure DevTools is opened when using the website so that stack traces get captured. When you want to know what created a node:
- Select the node in the Elements panel
- In the sidebar, select the Stack Trace panel (you might have to first click on the More tabs chevron
>>to see the tab)