Mozilla as a Debugging Tool

How do you debug web applications?

Passing requests through a proxy is one of the most convenient and powerful ways to debug an application during development. First you try cfdump, cflog, some debug output in the browser, and maybe some JavaScript alerts. If you are using a Flash front-end, you might use trace() or the NetConnection Debugger. But there is nothing like passing requests and responses through a proxy to give you the entire picture.

I have used a lot of different kinds of proxies to find out exactly what was occurring between the client and the server. I have used command-line proxies that log to a file, Java based proxies that I wrote myself, and graphical tools with all kinds of features. It never occurred to me, however, that one could simply be built right into a browser. Or, more accurately, if your browser could expose entire HTTP requests and responses rather than just HTML source, you don’t even need a proxy. If you can view the raw headers of an email message in most email clients, why not be able to watch HTTP headers in your browser? Well, if you use Mozilla, now you can:

http://livehttpheaders.mozdev.org/

3 Responses to Mozilla as a Debugging Tool

  1. Ian Chia says:

    I tried this before and while it’s quite useful for plain HTML based applications, the livehttpheaders tool doesn’t work for Flash Remoting. It seems that the http transactions aren’t picked up by livehttpheaders (and least under Win2K – I haven’t tried on OS X.)For my work, I still use packet sniffers like tcpflow under OS X or Analogx.com’s PacketMon instead. But if anyone can suggest how to get livehttpheaders to report Flash Remoting’s http headers under Windows, I’d love to know.- Ian

  2. It might have to do with the fact that Flash Remoting sends binary data between the client and the server. I’m not sure why this would affect livehttpheaders’ ability to just report on the headers since the headers should be in plain text, but I suppose it might.It’s certainly not the last debugging tool you ever need, but it’s pretty handy to have around.

  3. Marc Wallace says:

    I’ve used Proxomitron for the same thing: viewing incoming/outgoing HTTP headers.Since I use Prox for my standard web surfing anyway, it’s just a few clicks to open the log window.Just be sure to disable all of the filters. Just in case…