Share via


Configure the Windows Phone 8 Emulator to work with Fiddler

When working with Windows Azure Mobile Services it is handy to decrypt HTTPS traffic from the Phone Emulator to see what traffic is being passed to your Mobile Service.  Here is how to hook Fiddler up and get it to work with the Emulator.

  1. Install Fiddler and choose the ‘Built for .NET 4” version
  2. Run Fiddler and choose (from the menu) Tools, Fiddler Options…  Check these boxes in the HTTPS tab of the resulting dialog (and hit OK):
    image
  3. Set these options in the Connections tab and then hit OK:
    image
  4. In the command windows on the bottom left corner of Fiddler type: prefs set fiddler.network.proxy.registrationhostname HostName where HostName is the name of your desktop computer (in my case jsanderscarbon):image
    NOTE: To undo the proxy host registration use:
       prefs remove fiddler.network.proxy.registrationhostname HostName whereHostName is the name of your desktop computer
  5. Close and restart Fiddler.  When Fiddler restarts you may get a firewall warning (in fact you should if this is the first time you have done this) so make sure you let all 3 types of networks through your firewall for Fiddler.  Note: you don’t need to capture, you will still see the traffic that is proxied through it from the emulator so you can toggle the capture off by hitting F12. Go back to the dialog in Step 3 and look up and save the ‘Proxy registration address’  (in this dialog it is ‘jsanderscarbon:8888) Note: This will not appear in this dialog until you complete all the previous steps
  6. CLOSE THE PHONE EMULATOR
  7. Restart the emulator and open the Internet Explorer Browser, then type in https:// followed by the ‘Proxy registration address’ followed by /FiddlerRoot.cer (in this dialog it is ‘https://jsanderscarbon:8888/FiddlerRoot.cer’) then hit OK (TIP:  Hit the PageDown key on your computer keyboard and you can type in text fields of the emulator
    image
  8. You should connect to Fiddler and get a screen like this, Hit ‘install’ accept any prompts and hit ‘ok’

Now you should be able to capture traffic to and from your Windows Azure Mobile Service in the Windows 8 Phone Emulator !

Important Note: If your machine is joined to a domain, you will need to get an exception from your IT Admin. IPSec prevents incoming connections from non-domain joined machines (the phone emulator) unless there is a policy that allows it. 

Windows Phone 8.1 Emulator needs more configuration:

I will update my blog below for WP8.1… But this works

https://stackoverflow.com/questions/23462697/windows-phone-8-1-emulator-not-proxying-through-fiddler

 

Let me know if you found this handy!

Follow the Windows Store Developer Solutions team on Twitter @wsdevsol.

Comments

  • Anonymous
    June 07, 2013
    Personally I've found it much, much easier to just use Fiddler as a reverse proxy. This is the easier way for any of the mobile platforms' emulators.
  1. Doesn't require all of this setup,
  2. You don't have to have Fiddler always capturing, (yes, you can filter, but that still means Fiddler is in the middle of all other web traffic), which cleans up your traffic logs a lot!
  3. And most importantly you can add your proxy information or remove/add whatever is required and you don't have to get any exceptions from you IT Admin. The only pitfall is remembering not to check the url's in to source control still pointing to your machine :)
  • Anonymous
    June 26, 2013
    Thanks for the wonderful sharing!

  • Anonymous
    August 16, 2013
    Went through all the steps, and it doesn't seem to work. Should I expect to see a message about non-domain devices? Would be nice if there was some kind of basic monitoring tool in the emulator's network tab.

  • Anonymous
    September 10, 2013
    @ArnoVenter - Could you provide steps you took to configure this?

  • Anonymous
    February 21, 2014
    Thanks, for this awesome article, Jeff.  It saved me a bunch of time today!

  • Anonymous
    March 07, 2014
    I followed all the steps but still it doesn't work. I used two way to launch the emulator. one using Blue8.1 VM image and other one using WP power tools. Does this matter which way we launch the emulator. Can some one help?

  • Anonymous
    April 17, 2014
    Note: I don't support Fiddler so if you get stuck I may not know what you can do for help.  Please refer to the Fiddler website documentation.

  • Anonymous
    April 30, 2014
    hi, this method worked for me to start with and solved my debugging trouble. However, the very next day , I couldn't get it working again....same emulator, same fiddler. Is there something I should look out for? -thanks madhur

  • Anonymous
    June 19, 2014
    The comment has been removed

  • Anonymous
    April 02, 2015
    Thanks for the article but for Windows Phone 8.1 emulator capturing we have to follow one more guide step of 'letstango' in stackoverflow.com/.../windows-phone-8-1-emulator-not-proxying-through-fiddler. I quote it here: "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%system32mmc.exe "%windir%system32virtmgmt.msc" This appeared to help completely clear the network settings of the VM, and when you run Visual studio the VM will be recreated. "