With the rapid growth of HTML5, more and more people are beginning to relate to the mobile Terminal Web development field, but the mobile phone side always does not have so many debugging tools on the PC side. Even if the PC-side browser simulates user-agent for development, the problem of inconsistent rendering of mobile terminals and PC-side browsers may occur.
So, it is best to develop debugging on the real mobile phone, but, how to grasp the package?
Today, we'll show you how Fiddler crawls the data packets on the Android phone browser.
As is known to all, Fiddler is a proxy for data capture. For Android phones, it is also possible to intercept packets by pointing the network-connected agent to the Fiddler port of the PC.
Below, I take one of my practice as an example, to tell you how to operate.
Environment: Windows7, Moto mb860 (Android 2.3.4)
1, first, ensure that the installation of Fiddler computer and mobile phone in the LAN can access each other. Because you want to point the agent of the phone to the PC, it is not possible to access each other.
2, Fiddler open the remote connection. Fiddler main Menu Tools, Fiddler options...-> Connections tab
Remote computer connection will be allowed to tick, the above port number does not need to change, keep the default.
After the tick, please restart the Fiddler, this step is very important.
3, before setting up the mobile phone agent, we need to obtain the installation Fiddler this computer in the LAN IP. When the proxy server is set up on the phone, the Start menu opens the Run window (shortcut key Win + R), enter the cmd carriage return, go to the Windows command line tool, enter the ipconfig carriage return, the result shape as follows:
Your actual LAN IP must be different from mine, but don't worry, you have to write down this IP address.
3, now, we need to set up a mobile phone agent.
Open System settings
Access to wireless and network modules
Go to Wifi settings
Find the WiFi connection you are currently using, and press and hold the shortcut menu
Select "Modify Network" or "Proxy Server" to enter the editing interface
The proxy server will be used to tick and fill in the IP address Ipconfig obtained on the PC just now 192.168.1.105, port number Fiddler default 8888
Proxy exception address No, leave it blank.
Click Save to complete the proxy settings.
Now, we can try to configure whether it's OK, open the roaming browser
Enter a webpage http://ming.sinaapp.com, try it.
Meanwhile, let's take a look at the data capture results on Fiddler.
Bingo, it's done.
Fiddler Tracking Phone page packets