ant
ant

Reputation: 22948

How to deal with IE errors

I don't get any error in firefox or firebug, but yet in IE I get invalid argument for some reason, and I can't figure out what is the invalid argument, the javascript halts when "error" is discovered .. what can I do to debug it ?

Upvotes: 5

Views: 278

Answers (8)

chimerical
chimerical

Reputation: 6023

If you're on IE 8, that comes bundled with developer tools.

If you're on IE 7 or 6, there's the free IE Developer Toolbar from Microsoft.

There's also Companion.JS for IE 6/7.

Upvotes: 0

Paul Creasey
Paul Creasey

Reputation: 28894

get internet explorer 8, or the internet explorer developer toolbar

Upvotes: 2

Nikki Erwin Ramirez
Nikki Erwin Ramirez

Reputation: 9964

I prefer DebugBar over Firebug Lite.

Upvotes: 1

Tim Down
Tim Down

Reputation: 324727

I would use a cross-browser logging library such as my own log4javascript.

Upvotes: 0

smaclell
smaclell

Reputation: 4658

If you have Visual Studio you can use it directly to debug javascript. First uncheck the advanced IE settings "Disable script debugging" then attach VS to the IExplorer process (Tools => Attach To Process then find the process).

Clearly this is not the easiest option here but can work in a pinch. If you are already using VS to do your development just disabling script debugging and launching your website with IE will allow the JS debugger to work automatically.

Upvotes: 3

Rob
Rob

Reputation: 8195

Enable the script debugger in IE.

Note that with jquery or mootools 90% of the IE bugs (when it works fine in FF) is because I didn't explicitly extend an element I was working with.

In firefox you can just say element.jquery_function(), however with IE the element must be explicitly extended with element = $(element), or just get in the habit of writing $(element).jquery_function().

You didn't give enough info to debug your problem, but i'd guess that is a good place to start.

note: I use mootools but i'm assuming this also applies to jquery

Upvotes: 2

Mark
Mark

Reputation: 108567

Firebug Lite is awesome.

Upvotes: 6

Andy E
Andy E

Reputation: 344793

If you're running IE8, you can use the developer tools by pressing F12. You can also download them for IE7.

Upvotes: 3

Related Questions