Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging of Internet Explorer 9-10 crash

I'm a new developer of one site. Previous developer left a lot of trash and unstable code. But the main problem is that when I open this website and try to navigate throught the pages (just try 1-2 links) it crashes my IE 9-10. After I open the page, IE freezes completly, I can't do anything in it.

My question is:

How can I track the problem (may be some kind of debugger or online emulator)? Can you recommend some software or online tool to track JS/HTML errors, which can I use to understand the crash reason?

like image 616
freento Avatar asked Dec 11 '22 14:12

freento


1 Answers

Good question!

So! Your website crashes in IE, it's a painful problem I've had some times before. It's no fun, and don't expect a silver bullet solution, take comfort in that you're not the first one to experience this problem.

You can use visual studio to debug IE. Visual Studio lets you run specific script statements, use breakpoints and run specific bits of code in Internet Explorer.

If that seems too extreme to you, IE comes bundled with developer tools. However, I doubt that would be any help if IE crashes your site. Chances are, it'll crash even faster with developer tools open.

Here are some tips for debugging code that crashes your browser:

  • Disable JavaScript does the persist? If it does remove resources one by one.

  • If disabling JavaScript solves your issue, start enabling script files one by one. (Send the others to fake urls. Track the one file that's giving you the problem.

  • Use alert statements, they're blocking so no code is run in the background while they work (unless using things like WebWorkers), they don't require any extra tools, while they're messy, they're the most reliable thing you can do. You can put them in the middle of your DOM and they'll block the dom for rendering allowing you to spot exactly where the problem is.

  • Add Synchronous AJAX calls, while usually I'm strictly against abusing AJAX like this, you can write a small logger on your server that accepts these calls and logs. This will let you use logging.

  • Know where to ask! A good resource for asking IE specific odd questions that even good resources like StackOverflow can't solve is the IE Blog. The IE developer team reply to comments there, and you can ask questions like "why doesn't my site work" directly.

  • Don't forget to open a bug report when you find the problem! You'd want developers to do the same for you.
like image 82
Benjamin Gruenbaum Avatar answered Dec 27 '22 07:12

Benjamin Gruenbaum