Posts Tagged ‘127.0.0.1’

March 10th, 2008

Localhost HTTP debugging with Fiddler

I have been a huge fan of Fiddler the HTTP Debugging Proxy for a couple years now. However one thing that always bugged me about any network debugging tool was the fact that it could not debug localhost or 127.0.0.1. However I just found a solution while racking my brain for a way to debug one of my local projects.

I don’t know if many of you are aware but the website http://www.somesite.com points to 127.0.0.1 as a standard for URL examples.

C:\Users\Nick>ping somesite.com

Pinging somesite.com [127.0.0.1] with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms

So if somesite.com points to the same local IP address as localhost, I figured that I could just use somesite.com instead of localhost in my projects. I used the following setup:

Visual Studio www.somesite.com Setup

With the above setup I was able to get Fiddler to monitor my localhost traffic my tricking the network card to go external for the somesite.com reference.

Fiddler www.somesite.com

So basically that is all that I needed to do and it make pretty quick work of getting around the localhost problem.

Tags: , , , , ,

Posted in How To | kick it on DotNetKicks.com | Bookmark | View blog reactions | 13 Comments »