Please indicate the source of reprint:http://blog.csdn.net/zhaoyanjun6/article/details/72876628
<http://blog.csdn.net/zhaoyanjun6/article/details/72876628>
This article is from【 Zhao Yanjun's blog】 <http://blog.csdn.net/zhaoyanjun6/>

Fiddler What's this?

Fiddler It is ahttp Debug agent, It can Enough to record everything between your computer and the Internethttp communication,Fiddler
You can or you can check everythinghttp communication, Set breakpoints, as well asFiddle
Be-all“ In and out” Data( fingercookie,html,js,css Other documents, All of these can make you change your meaning). Fiddler
It's easier than other network debuggers, Because it's just exposedhttp Communication also provides a user-friendly format.


Fiddler It's the most powerful and usefulWeb One of the debugging tools, It can record all client and server'shttp andhttps request, Allow you to monitor, Set breakpoints, Even modify input and output data,Fiddler Contains a powerful event script based subsystem, And can use.net Language extension. You are right.HTTP
More understanding of the agreement,
The more you can masterFiddler How to use. The more you use itFiddler, The more it helps you understandHTTP Agreement.Fiddler Whether for developers or testers, Are very useful tools.

Fiddler How it works

Fiddler
Acting as agentweb Working as a server, It uses a proxy address:127.0.0.1, port:8888. WhenFiddler It will automatically log out when you exit, So it doesn't affect other programs. However, ifFiddler Abnormal exit, This time becauseFiddler No automatic logout, It will make the web page inaccessible. The solution is to restartFiddler.





Fiddler Download and install

Download address on official website:http://www.telerik.com/fiddler <http://www.telerik.com/fiddler>
Download to local, Then install the normal installation process.

It works as shown in the figure below:


Fiddler The operation mechanism of is actually monitoring on the local machine 8888 Port HTTP agent. Fiddler Default at startup IE
The agent of is set to127.0.0.1:8888, Other browsers need to be set manually, So will Chrome Browser proxy changed to127.0.0.1:8888 You can listen to the data.

Chrome How to set up a browser proxy

On the far right of the browser, click Three points Icon, Then click Settings



Click settings on the left, Then click Show advanced settings .



Then find Change proxy settings.





Come here,chrome The browser's proxy is set up.

open Https Packet sniffing

Fiddler By default,Fiddler Not capturedHTTPS Conversation, You need to set.



【 Talking aboutHTTPS as well asFiddler GraspHTTPS Agreement】 <http://www.jianshu.com/p/54dd21c50f21>

from all processes : Grab all https program, Include This machine and Mobile phone
from browsers only : Grab only the https request
from non-browsers only : Grab all but the browser https request
from remote clients only : Grab remote client's https , Can represent mobile phones

* Turn on the phone Https Grab a bag
If you just want to grab All on the phone https request, It should be selected from remote clients only .


How to useFiddler YesAndroid App to grab

http://jingyan.baidu.com/article/03b2f78c7b6bb05ea237aed2.html
<http://jingyan.baidu.com/article/03b2f78c7b6bb05ea237aed2.html>

How to turn on/ Close Grab the bag of this machine

If you need to grab a native request, Yes 3 Medium way.

* mode 1
Just start the program and make sure the lower left corner is Capturing state that will do.



* mode 2
Press shortcut key F12 Switching.

* mode 3
File --> Capture Traffic Checklist.



extend:

It's useful to note that, You can open the bag to grab the machine, It can also filter the package of the machine. When the mobile phone turns on the agent, You can filter out the package of this machine, Focus on mobile phone bag, At this time, all the phone's packages are in the conversation list.

Clear session list



Shortcut function



*
. The first isCapturing, Quick switch to control capture session;

*
. The second is to select the source program of the current session to be captured, All procedures, Browser, Non browser, Do not capture options.

*
.
The third is conversationrequest Breakpoints before sending andresponse Breakpoint after return and before browser, Once for each corresponding point, Click the button twice( Default is blank, i.e. no breakpoint),request Breakpoint and sumresponse Breakpoint details

*
. The following is some identification and description of the currently selected session, As currently selected127 First of sessions, detailedurl byhttp://www......

Filtering domain names


Fiddler Grab the package to complete the debugging and testing requirements of our mobile developers. But redundant web page requests and other mobile phone links affect our mobile phone development needs. So we need to eliminate other useless packages, Only focus on the request package of the domain name we specified.

* openfiddler, findFilters Options and click Open. As shown in the figure


By default, This page is gray, Does not filter any requests by default. Now let's check Use Filters .



* stay Hosts You can see it in it No Zone Filter : No filtering Show only Intranet Hosts : Show internal network hosts only
Show only Internet Hosts: Show only Internet hosts.


stay Hosts There are several options in the second drop-down box

show only intranet hosts

Reference material

Fiddler Course <http://kb.cnblogs.com/page/130367/>

Personal micro signal:zhaoyanjun125 , Welcome to your attention.