Localhost HTTP Debugging with Fiddler

I’ve had great success using ethernet sniffers (such as Etherdetect, or Ethereal) to troubleshoot communication problems. Installing a sniffer, even after installing the required WinPcap packet capture library, doesn’t require a reboot. I frequently use sniffers to troubleshoot servers and desktops alike. Ethernet sniffers should be a standard tool in your development troubleshooting toolkit, too.

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:

A screenshot of Fiddler

Fiddler has some special integration with IE that makes it particularly easy to use, but it can be used with Firefox as well.

I had some erratic results under IE7, but Fiddler basically works as advertised. There’s tons of supporting documentation on how to use it, including two MSDN articles. I’m using Fiddler as a localhost sniffer that’s limited to the HTTP protocol, but it does have some capabilities beyond what you’d see in a sniffer. For example, with Fiddler you can set breakpoints and tamper with the HTTP data before it is sent or received.

On the whole, I’d prefer to stick with a sniffer for localhost debugging. But a HTTP proxy like Fiddler is a reasonable workaround.

Related posts

Because Everyone Needs a Router

Do you remember when a router used to be an exotic bit of network kit? Those days are long gone. A router is one of those salt-of-the-earth items now; anyone who pays for an internet connection needs a router, for: 1. NAT and basic hardware firewall protection from internet evildoers

By Jeff Atwood ·
Comments

The Promise and Peril of Jumbo Frames

We sit at the intersection of two trends: 1. Most home networking gear, including routers, has safely transitioned to gigabit ethernet. 2. The generation, storage, and transmission of large high definition video files is becoming commonplace. If that sounds like you, or someone you know, there's one tweak

By Jeff Atwood ·
Comments

The Economics of Bandwidth

One of the sadder recent news stories is the disappearance of Turing award-winning researcher Jim Gray. I’ve written about Jim’s research before; he has a knack for explaining fundamental truths of computer architecture in uniquely clear ways. For example, in this ACM interview, Jim illustrates how the unusual

By Jeff Atwood ·
Comments

The Story About PING

Everyone loves ping. It’s simple. It’s utilitarian. And it does exactly what the sonar inspired name implies. Ping tells you if a remote computer is responding to network requests. The ping utility was written by Mike Muuss, a senior scientist at the U.S. Army Research Laboratory. Mike

By Jeff Atwood ·
Comments

Recent Posts

Let's Talk About The American Dream

Let's Talk About The American Dream

A few months ago I wrote about what it means to stay gold — to hold on to the best parts of ourselves, our communities, and the American Dream itself. But staying gold isn’t passive. It takes work. It takes action. It takes hard conversations that ask us to confront

By Jeff Atwood ·
Comments
Stay Gold, America

Stay Gold, America

We are at an unprecedented point in American history, and I'm concerned we may lose sight of the American Dream.

By Jeff Atwood ·
Comments
The Great Filter Comes For Us All

The Great Filter Comes For Us All

With a 13 billion year head start on evolution, why haven’t any other forms of life in the universe contacted us by now? (Arrival is a fantastic movie. Watch it, but don’t stop there – read the Story of Your Life novella it was based on for so much

By Jeff Atwood ·
Comments
I Fight For The Users

I Fight For The Users

If you haven’t been able to keep up with my blistering pace of one blog post per year, I don’t blame you. There’s a lot going on right now. It’s a busy time. But let’s pause and take a moment to celebrate that Elon Musk

By Jeff Atwood ·
Comments