Thursday, March 14, 2013

Capturing traffic from Windows Phone 8 Emulator running on a VM

Usually when you would want to capture traffic from a Windows Phone emulator, you will check "Allow Remote computers to connect" and run the below command in Fiddler QuickExec box

prefs set fiddler.network.proxy.registrationhostname <MachineName>

Then restart Fiddler and Emulator.

However, this does not work when Windows Phone 8 Emulator is running on a VM by following the steps at http://www.developer.nokia.com/Community/Wiki/Windows_Phone_8_SDK_on_a_Virtual_Machine_with_Working_Emulator

The fix is really easy. Instead of using the machine name of the VM, use the IP address of the VM when configuring fiddler.

Check "Allow Remote computers to connect" in Tools->Fiddler Options->Connections and run the below command in Fiddler QuickExec box

prefs set fiddler.network.proxy.registrationhostname <IP Address>

Then restart Fiddler and Emulator.