So I really love the Fiddler app, at work I mostly use Windows and this tool is absolute killer. There is a Mac version, but it needs a lot of love and isn’t as good right now. I mostly use it for remote debugging both local and on external server.

Fiddler as a proxy server

I basically use it for two purposes as a proxy server: * Access my local deployment of dev websites on other devices * Capture those devices traffic for debugging

Both of these points require access to an external device, an example will be I’m running a CMS locally which has a host of abc.dev.example.com normally you could add a host entry to your device to access this site, but on iOS you’re restricted from doing so. Fiddler allows you to create a proxy really easily so that your iOS device can now connect to your machine seamlessly.

To do this there’s only really two steps which is explained in the fiddler docs. Take a read of the docs to see the detailed example, but basically you:

  1. Tell Fiddler to allow remote computers to connect
  2. Set the device proxy in your network settings

It’s really as simple as that. Once this is configured you can navigate to abc.dev.example.com on your iPad or iPhone and browse the site.

Remote debugging locally on iOS

If you have also have a Mac you can now debug your local dev site on your iPhone / iPad with Safari, by pairing the device with the Mac and finding your device in the Safari develop toolbar. You also have the added bonus that Fiddler is capturing all your traffic from this device, so you can see exactly what is being sent down.

Remote debugging on an external server

I’ve explained above how you can use Fiddler on your local environment, but often something has been deployed to an environment I don’t have access to like a UAT environment, if I need to debug something on this it can often be guess work. Fiddler has another awesome feature called AutoResponder, it allows your to return files from your local machine instead of a resource from the server. You do this by setting an AutoResponder rule where you match the resource on the server that you want replaced with something on your local. If I need to test a JavaScript or CSS issue that is present on an environment that I cannot reproduce locally, this gives me the absolute certainty I require.

Composing HTTP Requests

Sometimes you might have the need to compose a request, as a front-end dev I use JSON feeds quite a lot. Often these are configured to only display JSON if youh have the correct header information, if I access the feed directly in the browser it might return an error or default to XML. The Fiddler composer feature allows you to customise a request and add whatever headers you wish.

I’m sure it has dozens of other useful features I’m not aware of, but that’s a few of my main uses for Fiddler. If you haven’t used it before I hope this post helps you find what you could use it for.