Daily Archives: 2006-05-23

Using Fiddler to Debug HTTP

Another interesting entry on Coding Horror talks about Fiddler:

I’ve had great success using ethernet sniffers (such as Etherdetect, or Ethereal) to troubleshoot communication problems. … However, Windows ethernet sniffers do have one significant limitation: they can’t sniff localhost traffic. Localhost packets don’t pass through the regular network stack, so they’re invisible to an ethernet sniffer. What’s a poor developer to do? The only recourse is a local HTTP proxy, such as Fiddler.

I didn’t realize that Fiddler can work around the “localhost” limitation with tools like Ethereal, but have found myself using Fiddler more and more often lately for several reasons:

  • It only captures HTTP (which is mostly what I need)
  • It’s pretty easy to run (you don’t need to be a super techie to run it)
  • It hooks into the standard WinInet configuration, so you don’t need to tweak settings in applications like IE and Yahoo! Messenger
  • You can decompress gzip compressed data

I haven’t yet used some of the advanced features like triggers and breakpoints (basically, ability to intercept HTTP requests and modify them on the fly), but for assessing things like web page performance and caching, this is a great tool to have in your arsenal.

Spaces, Underscores and Dashes

From Coding Horror, a summary explanation of choosing between spaces, underscores, and dashes:

So it behooves us to use something other than a space in file and folder names. Historically, I’ve used underscore, but I recently discovered that the correct character to substitute for space is the dash. Why?

In many contexts it seems that the underscore is actually treated as a word character, combining rather than separating words. He has some interesting examples using \w in regular expressions. His examples are from RegexBuddy, but you might also look at Regex Coach which is free.