Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging "he's dead, Jim!" error in Chrome

I'm working on a JS plugin. After adding some lines of code, I'm experiencing crashes in Chrome in certain situations, seeing a "he's dead, Jim" message after I kill the page. It means I have run out of memory, which probably means an infinite loop or the like.

I don't need help with the JS, that isn't what I'm asking. What I want to see is the traceback. I went to ~/.config/google-chrome/CrashReports/ (I'm using Ubuntu), but it's empty. I Googled around and tried using locate in terminal but couldn't find anything relevant (Google's troubleshooter mostly focuses on the user end experience, less on the developer end, so it isn't helpful).

I know I can use breakpoints and stuff, but I'd love to see the traceback too, and I also want to know the general process for debugging these sort of crashes (I won't always know what part of the code generated the crash, it's by pure chance that I happened to find it right away this time).

like image 829
yuvi Avatar asked Mar 30 '14 12:03

yuvi


Video Answer


1 Answers

Go to profile tab on developer console. Take a heap snapshot. By default it will show summary view. You can take two snapshot at different time and switch the comparison view. If you see any object with unusual delta or allocated size. This might be useful to find which object is getting created and not getting destroyed.

like image 120
DrEarnest Avatar answered Oct 05 '22 22:10

DrEarnest