views:

98

answers:

5

I'm trying to use firebug to walk through my code, but there's a syntax error somewhere and firebug is struggling with it. Are there any good tools that will scan my javascript for sytax errors?

Thanks in advance for your help!

+5  A: 

JSLint, the best!

http://www.jslint.com/

Josh Pearce
thanks, i'll try it out!
BeachRunnerJoe
+1  A: 

googled, find this interesting tool, I haven't personally used it, but from the screenshot, it seems be able to catch the error.

I use Visual Studio 2008 to write my javascript, it has intellisense, so vs will work for you if you have that.

J.W.
+1  A: 

I find that the error console in Firefox is the easiest way to locate errors in JavaScript. I asked a question about equivalents for other browsers but I haven't found anything as simple and easy to understand as Firefox's error console in other browsers, so even if I am using Google Chrome (my main browser) I often start Firefox in order to get the error console.

Kinopiko
+1  A: 

Google has a JavaScript compiler. Maybe it will find the issue for you.

http://code.google.com/closure/compiler/docs/gettingstarted%5Fui.html

Glenn
+2  A: 

I use JSLint, but Aptana and NetBeans (and some other) editors include syntax checkers that find problems as you type. As a result, I pretty much never have any syntax errors for JSLint to find. JSLint, of course, finds other problems.

Nosredna