Wednesday, May 11th, 2005

XMLHttpRequest tracing for Ajax debugging via GreaseMonkey

Category: Ajax, Utility

<>p>Julien Couvreur has written a GreaseMonkey user script to:

trace XMLHttpRequest calls in the javascript console. It logs the “open” and “send” calls, as well as the response status code and text.

Its purpose is to help peek into Ajax applications, to learning or troubleshooting, without having to run a network sniffer.

Here is a screenshot showing the output running on Google Suggest:

This is an early version, so some problems exist.

Related Content:

  • Cross-site XMLHttpRequest: Boon or Pandora's Box
    While Cross-Site XMLHttpRequest holds out the promise of bringing services from multiple Web sites into a single browser, it also can create a major...
  • Ajax Learning Guide
    Are you a Web developer? The time has come to rethink your entire approach to developing Web applications. Find out about the Ajax approach...
  • Ajax Learning Guide
    Are you a Web developer? The time has come to rethink your entire approach to developing Web applications. Find out about the Ajax approach...
  • Ajax Learning Guide
    Are you a Web developer? The time has come to rethink your entire approach to developing Web applications. Find out about the Ajax approach...
  • Testing and Debugging Learning Guide
    Discover the testing tools included in Visual Studio Team Edition and start whipping your application into shape today. The content in our guide is...

Posted by Dion Almaer at 11:26 am
6 Comments

+++--
3 rating from 6 votes

6 Comments »

Comments feed

LiveHTTPHeaders (http://livehttpheaders.mozdev.org/) is also a good option for this – more of a swiss army knife, also allows replay.

Comment by Michal Migurski — May 11, 2005

Actually, Adrian Holovaty also brought up Live HTTP Headers on my blog. But it is not that suitable for debugging AJAX: it doesn’t show the body of the response.
Also, I’m working on more AJAX-specific features (not available in Live HTTP Headers), such as edit and replay for callbacks, and possibly even setting breakpoints and editing XMLHttpRequest calls.

Comment by Julien Couvreur — May 11, 2005

There’s also httpheaders add in for internet explorer, http://www.blunck.info/iehttpheaders.html
few other mentioned on IE blog:
http://blogs.msdn.com/ie/archive/2005/05/10/416156.aspx

Comment by M.J.Milicevic — May 12, 2005

And, of course, there’s the buzzsaw of network troubleshooting tools (and my personal favorite), ethereal.

http://www.ethereal.com

Comment by Alex Russell — May 12, 2005

Just posted a new version, with some debugging features such as: edit&replay request, replay response callback,…
It’s at http://blog.monstuff.com/archives/000252.html

Comment by Julien Couvreur — June 1, 2005

If you are using windows, then http://www.fiddlertool.com/fiddler/ is damn fantastic for debugging an HTTP message flow.

I use it with Firefox by setting it up as a proxy using the SwitchProxy from http://mozmonkey.com/

Within fiddler you can even manually edit and then resend GET/POST requests – useful!

Comment by Morris Johns — October 5, 2005

Leave a comment

You must be logged in to post a comment.