how to scan javascript code to find errors (are there any programs do that) ?
views:
42answers:
4
+2
A:
Load it into Firefox, and use Firebug plugin. It enables you to debug JavaScript, and to see where errors are located in your code.
Guillaume Lebourgeois
2010-08-30 12:45:00
JSLint will hurt your feelings :)
Daniel Vassallo
2010-08-30 12:46:46
@Daniel Vassallo: Whereas some browsers will hurt your feelings by passively-aggresively gobbling up error messages and then being deliberately unhelpful. "Object expected on line 0", know what I mean? ;)
Piskvor
2010-08-30 14:51:19
@Piskvor: So true :)
Daniel Vassallo
2010-08-30 16:26:05
A:
Yes, a number of programs have plugins etc that can be used to detect common errors and syntax problems.
If I were you I would start here, JS Lint or here
In addition, each most browsers have a Javascript console where you can see errors reported and debug your code. Safari and Chrome have it in-built, for Firefox download Firebug.
michael
2010-08-30 12:48:44