Chapter 8. Debugging

For years now, debugging JavaScript has not been the easiest thing to accomplish because there has been a lack of tools and a lack of native ways of doing so. Of course, there has always been the simple, yet trusty, alert debugging, shown in Figure 8.1, and the more sophisticated alert debugging approaches involving the onerror event.

Figure 8.1. Trusty alert debugging.

This chapter will briefly cover the more sophisticated methods of alert debugging that can be achieved with the onerror event and responseText property from the XHR object. With that in mind, the main focus of this chapter will be to discuss a few tools that will help us debug our Ajax applications with extreme ease and leave us wondering how we ever developed without them. These tools are the Internet Explorer (IE) Developer Toolbar, Safari Enhancer, and my personal favorite, FireBug. This chapter will also feature screenshots from the final application, which we will debug with the various approaches that we will be discussing throughout this chapter. Let's get started by covering JavaScript's own onerror event.

Ajax for Web Application Developers
Ajax for Web Application Developers
ISBN: 0672329123
EAN: 2147483647
Year: 2007
Pages: 129
Authors: Kris Hadlock © 2008-2017.
If you may any questions please contact us: