How to debug memory issues with Edge DevTools
Jul 31, 2025 am 01:58 AMWhen encountering memory problems, Edge's DevTools provides a Memory panel for taking memory snapshots and comparing differences, and can locate unreleased DOM nodes or closure functions; 1. Use the Performance panel to monitor memory changes and view indicators such as JS heap memory and the number of DOM nodes; 2. Use Heap Snapshot to analyze the retained size and reference chains, and focus on checking the retained size large objects and (closure) or (array) types; 3. Pay attention to multiple snapshot comparisons, checking third-party libraries, using weak reference structures, and using task managers to confirm memory status.
When encountering memory problems, Edge's DevTools is actually a very handy tool. It provides many functions to help you locate and solve memory leaks, over-occupying and other problems. The key is to know which panels to use and how to analyze data.

Find the memory-occupancy large header: Memory panel
The Memory panel in Edge DevTools is the core of troubleshooting memory issues. You can take a snapshot here to see which objects in the current page take up the most memory.
How to use is very simple:

- Open DevTools (F12 or right-click to check)
- Switch to the Memory tag
- Click Take snapshot and do some operations (such as opening and closing a module, clicking a button, etc.)
- Take another snapshot to compare the differences between the two snapshots
Focus on objects that are not released, especially DOM nodes or closure functions, which may be the source of memory leaks.
A small trick: If you see a lot of
Detached DOM tree
, it means that although some nodes have been removed from the page, they are still being referenced by certain variables. Remember to check whether the event listening or cache mechanism has been cleaned up.![]()
Monitor memory changes in real time: Performance panel
If you want to observe the memory trend of the page during runtime, you can use the Performance panel.
Operation steps:
- Open the Performance panel
- Check the Memory option (usually, check it by default)
- Click Record and then do some interactions
- After stopping recording, you will see the line graph of memory usage
This chart can help you find out whether there is any continued memory rise. If the memory goes up and does not fall after each action is performed, there is a very likely leak.
In addition, you can see indicators such as JS heap memory, document objects, number of DOM nodes in the "Summary" below, which are all key information for diagnosis.
View object retention tree: Heap Snapshot Analysis
Heap Snapshot is the most commonly used tool to troubleshoot memory leaks. You can see the retained size of each object through it, which is how much memory it can be released if the object is garbage collected.
Several key points:
- View the Summary view, classify it by constructor, and find objects with retained size large
- Right-click an object and select "Retaining tree" to see who is referring to it
- If you see a lot of
(closure)
or(array)
that takes up a large chunk of memory, it may be because the function closure or array is not released.
For example: if you bind an event listener to window, but the component is not unbind when uninstalling, then the listener may be hung all the time, resulting in the relevant variables being unable to be released.
Tips and precautions
- Don’t just look at the snapshot once, take a few more times, so that the comparison changes will be meaningful.
- Note that third-party libraries may also introduce memory problems, especially those that use a large number of DOM operations or global state management.
- Using weak reference structures (such as WeakMap, WeakSet) can avoid some common memory problems.
- If you are not sure if it is a memory issue, you can first check out the JavaScript memory usage in the Task Manager (Shift Esc).
Basically that's it. Memory debugging looks complicated, but as long as you master the usage of several core panels and combine them with actual code logic to check the reference chain, most problems can be solved.
The above is the detailed content of How to debug memory issues with Edge DevTools. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Google Chrome is a free and fast multi-platform web browser developed by Google. It is known for its speed, stability and reliability. Chrome is based on the open source Chromium project and is widely used on devices such as desktops, laptops, tablets and smartphones. The browser has a clean interface and a wide range of customizable options, allowing users to personalize it according to their preferences. In addition, Chrome has a huge library of extensions that provide additional features such as ad blocking, password management and language translation, further enhancing the browsing experience.

Android phones can install Chrome extensions through KiwiBrowser. KiwiBrowser is an open source browser based on Chromium on the Android side. It supports the installation of the Chrome Web Store extension. The process is: Open Kiwi and enter the Chrome store, search for extensions, and click "Add to Chrome" to complete the installation; when using it, you need to pay attention to network stability, extension compatibility, permission granting and installation quantity; other alternatives include FirefoxMobile and YandexBrowser, but Kiwi is still the most stable and convenient choice at present.

On macOS, you can modify Safari's UserAgent through developer tools or terminals, but iOS/iPadOS does not support it. The specific methods are: 1. Use the developer tools to modify temporarily: select preset UA after enabling the development menu; 2. Permanent modification through the terminal: enter the command to write a custom UA; 3. iOS/iPadOS cannot be modified directly, and it needs to rely on a third-party application or browser.

ChromeRemoteDesktopusesport443(HTTPS)astheprimaryportforsecureconnections,andoccasionallyport80(HTTP)asafallback.ItalsoleveragesSTUN,TURN,andICEprotocolstoestablishpeer-to-peerconnections,withTURNactingasarelayifdirectconnectionsfail.Toensuresmoothop

Chrome's incognito browsing history cannot be viewed directly, but it can be obtained indirectly through three methods. 1. Use command line tools to view the DNS cache, which can only obtain some domain name information and is not durable; 2. Check the router or network monitoring log, which requires certain network knowledge and depends on network settings; 3. Install third-party monitoring tools and configure in advance to record invisible browsing behavior. Overall, the invisibility mode is designed to protect privacy. All the above methods have limitations. It is recommended to choose whether to use monitoring methods based on actual needs.

There are several ways to force exit from unresponsive Chrome on your Mac. First, use the keyboard shortcut Command Option Esc to open the "Force Exit Application" window, select Google Chrome and click "Force Exit". Second, click on the Apple menu, select "Force Exit", and select Chrome from the list and confirm quit. If Chrome completely freezes or consumes too much memory, you can open ActivityMonitor, find all Chrome-related processes, and click the X button one by one to end them. Finally, as an alternative, you can enter killallGoogle\Chrome in Terminal

To test page behavior in different time zones in Chrome, there are three ways to do it. 1. Use ChromeDevTools to simulate the time zone: Open DevTools → Click on three points → MoreTools → Sensors, check the overlay option in the DateandTime section and select the target time zone. This setting only takes effect in the current session; 2. Specify the time zone through the command line startup parameters: close all Chrome instances and execute chrome.exe--timezone="target time zone" to affect the entire browser instance; 3. Use JavaScript to overwrite the behavior of the Date object, and the fixed time value is used to accurately control the JS time.

There are four ways to turn off Microsoft Edge backend running. 1. Disable background running in Edge settings: Go to "Settings" → "System" and turn off the "Run Microsoft Edge in the background" option. 2. Close Edge in Windows startup item: Through the "Startup" tab of Task Manager, right-click Edge and select "Disable". 3. Modify the group policy or registry: Advanced users can create BackgroundModeEnabled registry key and set it to 0, or use the official group policy template. It is recommended to back up the system before operation. 4. Use Task Manager to manually end the process: temporary emergency plan, press Ctrl Shift Esc to open the Task Manager to end all Es
