11.4. Summary
Ajax debugging has traditionally been very difficult because of the asynchronous nature of the code combined with the data exchange between client and server. In this chapter, you learned about two tools that can aid in the debugging of Ajax applications.
First, you learned about FireBug, an extension for Firefox. This extension installs into the Firefox window as a panel containing information about the current page. One of FireBug's features is the ability to log all communication initiated using the XHR. Every time a request is made and a response received, an entry is made in the FireBug console containing the URL, the headers, and the response, and any data that was sent to the server in a POST request.
Next, you learned about the Microsoft Fiddler HTTP proxy tool. This tool intercepts all of the HTTP requests and responses sent from and received by your computer. Using Fiddler, it's possible to look at all of the information being sent between client and server, including headers, body, and more. What's more, Fiddler allows you to set breakpoints for requests and responses, which allows you to modify requests before they are sent to the server and modify responses before they are received in the browser.
As the importance of Ajax debugging becomes more evident, more tools are likely to arise. For the time being, though, FireBug and Microsoft Fiddler provide excellent Ajax debugging for free.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access