I've just started looking into Win Phone 8.1 and playing with proxying some data via Fiddler from the emulator but it doesn't seem to want to play ball. All the guidance around Phone 7 and 8 (not 8.1) seems to be that the emulator will route traffic as you'd expect other apps on the machine talking HTTP to do but I'm not seeing it happen. For example, Eric's post here: http://blogs.msdn.com/b/fiddler/archive/2010/10/15/fiddler-and-the-windows-phone-emulator.aspx
There are no filters applied.
Content is loading successfully in IE on the emulator.
Fiddler is successfully capturing all traffic from the host.
The emulator can successfully browse to the host in order to pull the Fiddler root cert.
Fiddler has the registrationhostname property correctly set.
So I'm pretty much out of ideas and I'm seeing the same behaviour on multiple machines. I'm more inclined to think I've missed something obvious than I am to think something has changed in 8.1, any thoughts on what to try next?
One thing that I'm confused about is that the guidance I see (such as Eric's) talks about configuring Fiddler to allow remote connections but then there's nothing on setting a proxy in the emulator as you'd normally do with a physical device. I assume this is accounted for by configuring the host name in Fiddler and that it's then resolved by the emulator to route through the proxy?
Edit: Just for reference, I need the emulator as it'll be used in an upcoming Pluralsight course where I want to show both the phone behaviour and the traffic via Fiddler. I suspect the issue may be related to the fact that it's talking over a virtual NIC on the host, sound reasonable?
I personally always use a hardware phone and set Fiddler's remote port as the proxy in the phone's Wi-Fi Settings app.
That said, it should be possible to listen to the WP81 emulator. I just haven't tried this myself. I remember having similar problems when trying to listen in on Zune traffic when a Windows Phone 7 device was connected. It turned out Zune ignored Fiddler's proxy settings, so I had to resort to some other measures. Here's the reply I got from Eric Lawrence, Fiddler's author:
Source
Maybe this will work for you.
I can successfully use Windows Phone 8.1 Virtual Machines (on Windows 8.1 Update 1) with Fiddler.
Try this:
Tools
>Fiddler Options
>Connections
. Change theFiddler Listen Port
from8888
to something else, e.g.8889
. (The Windows Phone team decided to steal port 8888 for their debugger).Allow remote computers to connect
box.Ok
buttonprefs set fiddler.network.proxy.RegistrationHostName 169.254.80.80
where the IP address is found at the top of the tooltip you see when hovering over theOnline
indicator at the top-right of Fiddler's toolbar.Run
for theWindows Phone 8.1 emulator
.Custom Settings
. In theData Sense savings
drop down, chooseOff
.Done
.Step #2 technically shouldn't be required (because their debugger is listening on loopback instead of the public IP), but it can't hurt. I'm not positive that Step #8 is required, but given that Data Sense's browser-optimization service is based on a proxy in the cloud, it certainly seems like it could interfere.
@EricLaw's method for getting the WP 8.1 emulator to play with Fiddler definitely works. Additional things that I had to do included:
Delete the existing WP VM from the Hyper-V manager. You can open this by either searching for it or typing this in the run command: %windir%\system32\mmc.exe "%windir%\system32\virtmgmt.msc"
This appeared to help completely clear the network settings of the VM, and when you run Visual studio the VM will be recreated.
Also if you're trying to run this on a corporate network, I've read people coming into problems when their network is running IPSec. For this you will either need to get an exception for the emulator, or use a different network -- such as a guest network.
HTH