Help us make DevTools Tips better! Fill out this survey to tell us more about your DevTools habits and frustrations.
Get detached DOM elements to investigate memory leaks
Edge has a tool just for this: the Detached Elements panel. To use it:
- Open the command menu and type "detached" to find and open the Detached Elements tool.
- Click the Get detached elements button to list all of the currently detached elements.
- Don't forget to click the Collect garbage button every once in a while to force garbage collection. Then get the detached elements again. Indeed, some elements may remain in memory simply because the browser hasn't yet cleaned them up. Forcing GC makes sure the list only contains the elements that are detached and cannot be cleaned up.
You can find out much more about this tool in this blog post and over at Microsoft's documentation site.