wrathican Posted April 28, 2009 Share Posted April 28, 2009 I write this in the hope that it will help a few people out there. There are many ways in which to debug JavaScript. Some involve websites, and some involve browsers. The best way I have found to debug Javascript is to use Mozilla Firefox with the FireBug add-on. If you are a developer and do not have these, then you are doing something wrong. FireBug provides excellent JS debugging, HTTP Request monitoring and inline html editing, among other features. FireFox has the advantage of being cross-platform allowing any add-ons to be platform independent too. Using other browsers error/debugging tools just dont cut it for me. Stay away from the Internet Explorer JS debugging client. It is terrible, although since IE8 it has become more informative, but you cannot use the browser again until it's closed. Another great way to debug JS and follow best practices is by pasting your script into JSLint. This provides a list of things wrong with your script. If you use AJAX then use JSON. Please do NOT use eval. Eval is EVIL as JSLint will constantly remind you of! Use a JSON parser. Preferrably this one kindly provided from the people over at JSON.org Please feel free to add your comments/debugging tips! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.