Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug unresponsive page in Google Chrome?

Tags:

I've got a fairly complex javascript application (it uses no external frameworks) that users are currently testing (a couple thousand lines). I've been getting reports that users are getting the popup in Google Chrome saying:

The following page(s) have become unresponsive. You can wait for them to become responsive or kill them.

They report that the only way to keep using the app is to open a new Chrome window, but that the messages comes back up every few minutes, and only happens when they try to go to a new page. They specifically said that they click to go to a new page, and the current page never changes, they just see the spinning loading icon for a minute until the popup comes sup.

The odd thing is that I've tested extensively on the exact version of Chrome (18) that these users are having issues with, and I've seen no problems. I'm sort of stumped and don't know where to look now since I've been unable to duplicate it, any ideas on where to look next to at least try and figure out what could even be causing that error?

like image 909
James Simpson Avatar asked Apr 05 '12 20:04

James Simpson


People also ask

Why are all my pages unresponsive?

Google Chrome usually displays a “Page Unresponsive” error when a web page takes too long or fails to load correctly. In most cases, selecting Exit pages and refreshing the problematic page should help you get rid of the error for good. If not, try accessing the page on another browser such as Edge, Safari, or Firefox.


1 Answers

Use the chrome javascript debugger to pause (breaks running code) during the unresponsiveness. It takes some timing, but it should break in the middle of whatever is running too long. You can then use the debugger controls to step around and see what is looping unnecessarily.

like image 75
Colin Godsey Avatar answered Sep 21 '22 17:09

Colin Godsey