views:

354

answers:

3

I have created a fairly large Javascript app that works in Firefox and up until yesterday, IE. I've made quite a few changes and now I'm getting syntax errors in IE, but all is fine in Firefox. Obviously I have a trailing comma somewhere but I can't see it. IE's error message is less than helpful, not even telling me which JS file has the error.

Is there a syntax checker for Javascript that will inform me of such errors in more detail?

+1  A: 

JS lint -> http://jslint.com/

J-P
+2  A: 

http://www.jslint.com/ will catch those comma and semicolon problems.

Example:

Error:
    Problem at line 1 character 17: Extra comma.

var foo = ['bar',]

    Problem at line 1 character 19: Missing semicolon.

var foo = ['bar',]
Tyson
A: 

I would try it in IE8rc1. The new debugging tools are a far cry from Firebug, but they should tell you exactly what the problem is in this case.

Chase Seibert