Chapter 5

Troubleshooting JavaScript Programs


check Finding errors in your JavaScript code

check Using JavaScript debuggers

check Working around errors

A fact of life when working with any type of programming language is that there will always be errors as you develop your application code. Working with JavaScript is no different. There are plenty of opportunities for coding errors to cause all sorts of problems in your web applications. But don’t worry — getting an error in your application isn’t the end of the world. There are some simple tools at your disposal to help you find and fix those errors before your site visitors experience them. This chapter helps give you some ideas for what to do when errors occur as you develop your applications and offers tips for how to work your way through them.

Identifying Errors

Your web application may run into an error and it’s fairly obvious that something went wrong — something that was supposed to happen didn’t. Other times, however, program errors can be a little more subtle, such as altering the data in a way that’s not obvious until you analyze the output. These types of errors are dangerous, because often you don’t even know they’re ...

Get PHP, MySQL, & JavaScript All-in-One For Dummies now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.