Opening big JavaScript files, such as minified files on Chrome Developer Tools, tab Sources, makes it freeze. On a project of mine, if I click on jquery-1.11.1.min.js
it hangs and I can't do anything other then close the tab. To make things even harder, Chrome remembers the last file opened on the Source tab, and remembers the last tab opened, so I have to open another website, fire up Developer Tools and change tabs in order to make it work on my project. I had to debug using Firefox instead of Chrome.
6 Answers
This is a known bug: Chromium Bug Tracker - Issue 593679 - [REGRESSION] DevTools: Big sources hang the Developer Tools, and it's currently fixed, but not available on regular/stable Google Chrome or Chromium.
The temporary solution is to use Chrome Canary.
For me blackboxing is not working also. Helps only:
- Kill Chrome process that eats CPU (developer tools will be closed)
- Open any website without huge source files (e.g. ya.ru)
- Switch source tab to another
- Open Developer Tools on the target website (and do not switch to source tab)
Also I do not have this problem on Chrome Canary
Chrome remembers the last file opened on the Source tab
This is how I worked around that, and got my sources tab back:
- Open devtools on a site other than the one that hangs it
- Ctrl + Shift + I to inspect the devtools itself
- Go to the Application tab then Local Storage
- Locate the
previouslyViewedFiles
key underdevtools://devtools
- Press the delete key to delete the entry
Update Sept 2020:
Just coming back to note that I tested Chrome stable 85.0.4183.121, and this is much improved! (I haven't tested in a while, so I'm not sure exactly when it improved. But there was some movement on the bug report in May.)
Sept 2019: Chrome 77 still has this problem.
Here's one way it happens:
- Open page, open debug tools
- Open your desired minified JS file, click the pretty format button.
- Set two breakpoints on line N and line N+1
- Refresh your browser. Hits first breakpoint quickly.
- Press resume / F8
- Takes 2 minutes to reach the next breakpoint.
Here's another way it happens:
- Open page, refresh a few times, all good
- Open debug tools, find file, pretty print
- Refresh a few times, still good
- Try to add a breakpoint in pretty formatted file...
- FREEZES, cpu pegged, can't click
- 140 sec later, tools responsive again
For me, my browser wasn't freezing until I tried to save a change to a large, minified JS file in the sources
panel. Chrome Canary wasn't solving this problem for me like it had for others, but I was able to find a solid work around by using the "Local Overrides" feature in Chrome Dev Tools. https://developers.google.com/web/updates/2018/01/devtools#overrides
Chrome still crashed when I saved a change in dev tools to a javjascript file in the sources tab, but it did successfully save it to the overrides folder and i was able to see this change on my site after reloading Chrome.