开发者

How to get readable syntax errors in Java Script?

Hi I am beginner in JS, Using linux ( Firefox, Chrome), Is there any way by which I get what are the syntax errors are there in my JS开发者_C百科, the way I get my C syntax error in GCC?


Install Firebug, it will save your life!!! Anyway in Firefox you can look into the error console in the tools menu and in Chrome you can open the javascript console in the tools menu.


if you use a script-editor like netbeans, it will show syntak errors on typing. for testing in a browser, i would suggest using firebug (and i'm sure theres something similar for chrome, too).


Chrome : ctrl + shift + j : this will bring up the JavaScript console. You can click the scripts tab to review page scripts.

FireFox : Install firebug and run it to get a similar console to the above stated chrome utilities.

IDE : You may wish to use netbeans or Eclipse which both offer syntax highlighting and code completion for JavaScript. These will indicate syntax errors at code time.

jslint/jshint : These tools offer code suggestions to improve your code quality and reduce the possibility of errors (logic) but will also break on syntax and other errors.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜