A software package a day: Fiddler

When doing web programming there are many times when a response doesn’t come back as expected. Sometimes it is hard to determine the exact post that was created and the redirects that were followed. Adding debugging statements can help, but in complex post and redirect situations a tool like Fiddler can really speed up the diagnostic process.

The basic use is simple enough: launch Fiddler and set your browser to use it as a proxy (this is automated to happen when launched with the most recent versions if you wish). Then you use your browser as you would normally, exercising your application.

For diagnostics, the most useful tab is the Inspector. This allows you to view the data passed between the browser and the server in a multitude of ways. The Request Builder is also useful as it allows arbitrary requests to be made (including ones that contain illegal values) which allows testing against common methods (SQL Injection, Cross Site Requests and Cross Site Scripting) that malicious users might use to attempt to breach the security of your application.

Once the application runs properly, the Timeline can be an excellent way to discover exactly how long the response took to arrive and what the slow parts were. Digging deeper there are breakpoints, filters, scripting and more which turn a simple observation tool into a comprehensive debugging platform for low level interactions of a browser and a server. This has saved much time when the problem turns out to be the server itself doing something unexpected, such as applying a security rule against a URL which otherwise should be valid.