Wednesday, May 4, 2011

Enabling Fiddler on the Windows Phone 7 emulator

By David E.

Fiddler is a Web Debugging proxy to capture traffic between our computer and the Internet. It shows in detail all the requests made ​​by any application that accesses the Internet. Sometimes it is useful to review a page using Fiddler if there’s an image that we need or we want to know the logic of some specific client functionality, as Fiddler can tell us all files that are loaded when a page loads: html, aspx, css, js, etc.

One of the biggest advantages of a Web Debugging Proxy is that it is possible to see some requests to some services in our applications. Even though we have a desktop application, if there is a reference to a service in our code and we put a call to a method of that service, Fiddler can catch traffic request and service response. In particular, in Silverlight applications, or specific applications for Windows Phone 7, these calls can be made ​​using WebClient or WebRequest objects like.

To enable Fiddler on the emulator of WP 7 is necessary:

1. Install Fiddler on the version 2.3.0.7 (or some higher).
2. Start Fiddler
3. Select the menu "Options Fiddler"
4. Open the tab "Connections"and select the checkbox that says "Allow remote computers to connect"

1-fo

5. Press OK to close the dialog.
6. In the Fiddler command line run the following command prefs set fiddler.network.proxy.registrationhostname HostName where HostName is the name of your computer you're running the emulator.

2-fo

7. Close and restart Fiddler.
8. Start (or restart) Windows emulator Phone 7. This can also be made by stopping and re-run our application of WP7.
9. Open Internet Explorer in an emulator or run the command in your application that makes the request for service.
10. Verify that traffic is properly captured in Fiddler

3-fo

No comments:

Post a Comment