Engaged in front-end development of the students must be not unfamiliar with fiddler, it is a very powerful HTTP (s) protocol analysis tool, if you do not know what it is, you can Google, this article no longer for science, Simply say it can replace the functionality of the Chrome Developer tool in the network panel or Firefox's HttpWatch plugin.
We know how to debug page requests on the computer, but on the phone you don't have so many powerful debugging tools to debug your webapp, and if you need to see the HTTP request that is generated when you open the page on your phone, you don't know how to do it, keep looking down. (Of course, in most cases, you can view it directly on your computer using Chrome or Firefox analog mobile browser)
Fiddler supports the function of the agent, that is, all your HTTP requests can be forwarded through it, the Fiddler proxy uses port 8888 by default, and it is not possible for a classmate to be able to use FQ because of port conflicts.
Using this, we can set the HTTP proxy as fiddler proxy Server on the mobile phone, so that the request of the mobile application is forwarded through the Fiddler, which realizes the function of viewing the request of the phone-side page.
First we open the Fiddler->tools->fiddler options in the connection panel to select Allow remote computers to connect
, after determining, Close fiddler and reopen Fiddler.
Fiddler options
At this point, in order to ensure that the agent is working properly, we can perform a check in CMD to netstat -anop tcp
see if the fiddler process is properly listening on port 8888, if the service does not open properly, you can try to use a different port, the location of the port modification, such as location.
Fiddler Proxy
From what we see, the process ID of 8392 fiddler is listening on port 8888, indicating that the agent is already working. Then we want to set up the agent of the mobile phone agent fiddler proxy, proxy settings need an IP and a port, IP is the fiddler computer's LAN IP address, port default is Fiddler agent Port 8888, Make sure that the network segment where your phone is located has access to the network segment where your computer is located, and there is generally no problem with the same LAN.
WiFi setting
My mobile phone brush is MIUI, set up the agent is relatively simple, directly in the corresponding WiFi settings can be. Mobile phone agent settings do not understand can also leave a message or find the relevant information on their own. Now let's test the effect.
On the phone side open the watercress, look at the Fiddler hear the request:
Web Testing
As we expected, you can start debugging your phone-side webapp request.
Fiddler request
FAQ:
1. Why does my access page prompt for a proxy server connection failure?
In the case of confirming that all settings are not wrong, you can try to turn off the firewall or anti-virus software with firewall features, if you can access it after closing, you can release the Fiddler in the firewall settings.
Use Fiddler to debug phone page requests