« THE SCOTT ADAMS COLLECTION : AJAX Adventure Game | Main | AJAX Google search implementation »

Debugging AJAX applications

Many people are wondering how to debug AJAX application. In fact, the idea of cross plateform development isn't that easy to debug, there is Javascript calls, and there is XML server response in the other side. And if you have two errors in the two sides you'll have a great "debugging day"

A Solution that help doing this, and I guess firefox users know it, is the extension GreaseMonkey. GreaseMonkey is really great and you can use it in lot of applications. It was banned for Gmail because it allow to replace the "Archive" button with "Delete" one :-)

Debug AJAX

So howto use Greasemonkey as an AJAX debugger ?

  • Well first you have to install it, from http://greasemonkey.mozdev.org/
  • Then you need to get the XMLHttpRequest Debugging script
  • When you visit the script page, right click and install User Script or from menu Tools then install User Script
  • Now that the script is installed just go to Tools > Manage User Scripts and add hosts/pages you want allow debugging.
  • That's all, now if you open your page and it do an XmlHttpRequest it will open a div with all messages, then you can hide, clear, minimize ... etc

So hope this will help you debugging, and hope you won't need to use it only if you're fun of debugging :-)

Update : There is a security issue that just have been reported about Greasemonkey Insecurities, so be aware ! In the newsletter they said to Uninstall Greasemonkey altogether until it will be fixed

Bookmark this article at these sites
Comments
1

What do you mean it was "banned for Gmail". I use a nice Greasemonkey Gmail script...

Post a comment





(Email will remain hidden)





Please enter the security code you see here




Related entries
Email to a friend
Email this article to:


Your email address:


Message (optional):