Using Fiddler with Devices

Using Fiddler with Devices

Fiddler is a free HTTP debugging tool created by Eric Lawrence (@ericlaw). It acts as a proxy server, which is an intermediary between web clients and servers. It started as a convenient tool to simply capture requests and responses, much like the network tab in browser developer tools. As a proxy server though, Fiddler had the opportunity to do so much more than simple passive monitoring. Over the years Eric added many more advanced capabilities such as: debugging HTTPS traffic; manipulating requests and responses; embedding features into .NET applications; and an AutoResponder to return specific content for matched requests. Fiddler is now an indispensable tool for modern web developers and network engineers. While Fiddler was changing, so was the nature of web sites and how users access them. Today, it is very likely that users are accessing web sites from mobile devices, so the question becomes how to use all of Fiddler’s great features to troubleshoot issues for smartphones or non-Windows devices and platforms? It is a huge advantage that Fiddler is a proxy server, and most web clients can be configured to use a specific proxy. I’ll demonstrate the technique using an iPhone, but most of the process is the same for any type of client.

Configuring Fiddler Machine

These steps are done on the Windows machine (there is a beta Mono implementation) that is running Fiddler.

  1. Open Fiddler, go to the Tools -> Telerik Fiddler Options

  2. Go to the “Connections” tab and make note of the port number Fiddler is listening on (default 8888) and make sure “Allow remote computers to connect”

  3. Open a “Command Prompt” window and type “ipconfig” and enter. Look for the IPv4 address

  4. You may need to enable a firewall (if present) to allow traffic to this machine from other devices (beyond the scope of this article)

  5. Leave Fiddler running, waiting for the device to start making requests

Configuring an iPhone

These steps vary by device and platform. The goal is to set the proxy server for the device’s browser. This is typically set in browser options, but on an iPhone is actually configured in the Wi-Fi settings.

  1. Go to Settings

  2. Go to Wi-Fi, and click on the name of the connected network

  3. Scroll to the bottom and manually set the proxy setting using the Fiddler machine’s IP address and port

  4. Use Safari on the iPhone to visit a web site and the traffic should be displayed in Fiddler! Here is a screenshot of the user agent submitted to show the capture

Conclusion

Fiddler is an excellent and important tool for modern web developers. As more site visitors are using mobile devices to connect, the ability to continue to use Fiddler to troubleshoot problems is critical.