Alp
Alp

Reputation: 29749

Debugging Website with JavaScript errors in IE9 - opening debug console fixes the error

I have a website which triggers some JavaScript errors in IE9. When opening the debug-console with F12 and reloading the page, the problem disappears and everything runs just fine. This is clearly annoying and therefore it's difficult to detect the error message in order to solve the problem.

It's a page with a Google Map. Normally, there should be markers on the map. In IE9, there aren't. When opening the console, everything is working.

Does anyone know how to debug this annoyance?

Upvotes: 2

Views: 814

Answers (1)

bfavaretto
bfavaretto

Reputation: 71939

In IE, the console object is not available unless the console is open. That's what's causing the errors when it's closed. Remove all references to console from your code and you should be fine.

Upvotes: 5

Related Questions