Debugging HTTP traffic using Fiddler

Microsoft Fiddler is a HTTP debugging proxy that lets you log all HTTP traffic between your computer and the internet. Fiddler lets you to inspect all HTTP traffic, set breakpoints, and “fiddle” with incoming or outgoing HTTP data. To run Fiddler you require a Windows machine with .NET 1.1 framework installed.

How Fiddler works

The proxy bascially sits between the Windows WinINET interface and the internet. WinInet is high level API to work with HTTP, FTP, and Gopher protocols.

fiddler-archi

Installing Fiddler

Fiddler is an HTTP Proxy running on port 8888 on your local PC. You can configure any application which accepts a HTTP Proxy to run through Fiddler so you can debug the particular applications traffic. WinINET-based applications (E.g. Microsoft Office, Internet Explorer, etc) should automatically use Fiddler while it’s running and the “Capture Traffic” box is checked on the Fiddler File menu.

Current versions of Internet Explorer, Google Chrome, Apple Safari, and Opera all automatically use Fiddler when Fiddler is configured to Capture Traffic.

If your browser does not automatically use a proxy then you can configure it to point to address: 127.0.0.1, port: 8888.

Logging with Fiddler

You can easily log HTTP traffic using Fiddler to track down bugs from your browser or website and save it to a file. This can be quite handy if you need to send the logs to the testing team.

Transfer timelines

Like many other browser addons, Fiddler also supports transfer timelines.

fiddler-timeline

Extending Fiddler Using Rules

Fiddler lets you modify its HTTP request or response by using the JScript.NET scripting language. You can also write your own plugins to change Fiddlers behavior in any .NET language. Sadly being from the php camp I do not have much experience there.

Text Encode/Decode Wizard

I specially like the ‘Text Wizard’ which lets you process text in a variety of formats. You can encode/decode data using: Base64, URLEncode, HexEncode, JS string, HTML Encode, UTF-7, Deflated SAML.

HTTP Performance tuning

The author of Fiddler, Eric Lawrence, has an excellent article that goes into the details on HTTP performance tuning.

Fiddler in a Nutshell

Fiddler is an excellent tool for both troubleshooting client/server applications and tweaking the performance of web applications. There are many more things you can do with Fiddler for which this post cannot do justice. Fiddler gives you an inside view into the mechanics of HTTP requests and responses, allowing you to understand what your application is doing. With that knowledge under your belt, you can write better, faster, and lighter applications.

3 thoughts on “Debugging HTTP traffic using Fiddler

Comments are closed.