Fiddler is one of the most powerful Web debugging tools available--Web Capture analysis

Source: Internet
Author: User
Tags clear screen fiddler2

Fiddler Tutorials

Fiddler is one of the most powerful Web debugging tools that can record HTTP and HTTPS requests from all clients and servers, allowing you to monitor, set breakpoints, and even modify input and output data. The use of Fiddler is a great help both for development and for testing.

Read Catalogue

    1. Basic introduction of Fiddler
    2. How the Fiddler works
    3. Other tools of the same kind
    4. Fiddler how to capture a Firefox session
    5. Using the Fiddler plugin in Firefox
    6. Fiddler How to capture an HTTPS session
    7. Basic interface of Fiddler
    8. Statistical view of Fiddler
    9. Quickexec use of the command line
    10. Setting breakpoints in fiddler modify request
    11. Fiddler Setting Breakpoint Modification response
    12. Creating Autoresponder rules in Fiddler
    13. How to filter sessions in Fiddler
    14. Session compare function in Fiddler
    15. The encoding gadget provided in Fiddler
    16. Query session in Fiddler
    17. Save session in Fiddler
    18. Fiddler's script system
    19. How to use fiddler when you debug a Web site vs.
    20. Response is garbled.
Basic introduction of Fiddler

Fiddler's official Website: www.fiddler2.com

Fiddler official website provides a lot of help documentation and video tutorials, which is the best information for learning fiddler.

Fiddler is one of the most powerful Web debugging tools, it can record all the client and server HTTP and HTTPS requests, allowing you to monitor, set breakpoints, and even modify the input and output data, Fiddler contains a powerful event-based scripting subsystem, And can be extended using the. NET language

The more you know about the HTTP protocol, the more you can master the way fiddler is used. The more you use Fiddler, the more you can help you understand the HTTP protocol.

Fiddler is a very useful tool for developers and testers alike

How the Fiddler works

Fiddler is working as a proxy Web server, which uses proxy addresses: 127.0.0.1, Port: 8888. When Fiddler automatically sets up the agent, it automatically unregisters the agent when it exits, so that it does not affect other programs. However, if Fiddler exits abnormally, this is because Fiddler does not log off automatically, which can cause the webpage to be inaccessible. The workaround is to restart the next fiddler.

Other tools of the same kind

Similar tools are: HttpWatch, Firebug, Wireshark

Fiddler How to capture a Firefox session

can support HTTP proxy of any program's packets can be fiddler sniff, fiddler operation Mechanism is actually on this machine listening to 8888 port HTTP proxy. Fiddler2 start when the default IE proxy is set to 127.0.0.1:8888, and other browsers need to be set manually, so the Firefox agent to 127.0.0.1:8888 can listen to the data.

Set up the agent on Firefox with the following steps

Click: Tools, Options, click Advanced tab-> Network tab-Setting on the Options dialog box.

Install fiddler plugin in Firefox

Modify the agent in Firefox is troublesome, do not need to fiddler the time to remove the agent. Trouble

It is recommended that you use the Fiddler hook plugin in Firefox, which makes it very convenient for you to use Fiddler to get the request and response in Firefox.

When you install the Fiddler, you have installed the Fiddler hook plugin, you need to go to Firefox to enable the plugin
Open Firefox tools->add ons--Extensions start Fiddlerhook

Fiddler How to capture an HTTPS session

By default, Fiddler does not capture HTTPS sessions and requires you to set the Fiddler tool->fiddler Options->https tab to open

Select the checkbox and the following dialog box appears, click "YES"

Click "Yes" and set it up.

Basic interface of Fiddler

Look at the basic interface of Fiddler.

There are a lot of messages to see request or response under Inspectors tab. Where raw tab can view the complete message, Headers tab only looks at the header in the message. Such as

HTTP statistics view for fiddler

By displaying all of the HTTP traffic, fiddler can easily show you which files generate the page you are currently requesting. With the Statistics tab, the user can select multiple sessions to get the total information statistics for these sessions, such as multiple requests and bytes transferred.

Select the first request and the last request to get the overall time consumed by the entire page load. You can also separate which requests take the most time from the bar chart to optimize access to the page

Quickexec use of the command line

The lower left corner of Fiddler has a command-line tool called Quickexec, which allows you to enter commands directly.

Common commands are

Help opens the Official usage page and all the commands are listed

CLS Clear Screen (Ctrl+x can also clear the screen)

Select a command for a session

?. PNG to select a PNG suffix picture

BPU Intercept Request

Setting breakpoints in fiddler modify request

[Small tank] Fiddler the most powerful function is to set breakpoints, after setting breakpoints, you can modify HttpRequest any information including host, cookie or the data in the form. There are two ways to set breakpoints

The first type: Open fiddler click Rules-> Automatic Breakpoint->before requests (this method interrupts all sessions)

How to eliminate the command? Click rules-> Automatic Breakpoint->disabled

The second type: Enter the command at the command line: Bpu www.baidu.com (This method only interrupts www.baidu.com)

How to eliminate the command? Enter a command on the command line BPU

See an example, simulation Blog Park login, in IE open the Blog Park login page, enter the wrong user name and password, with fiddler interrupt session, modify the correct username password. This will enable you to log in successfully

1. Open the login interface of the blog park with IE http://passport.cnblogs.com/login.aspx
2. Open fiddler and enter BPU on the command line http://passport.cnblogs.com/login.aspx
3. Enter the wrong username and password Click Login
4. Fiddler can interrupt this session, select the interrupted session, click the WebForms tab under Inspectors tab to modify the username password, and then click Run to completion as shown.
5. The result is a proper login to the blog park

Fiddler Setting Breakpoint Modification response

Of course fiddler can also modify the response

The first type: Open fiddler click rules-> Automatic Breakpoint->after Response (this method interrupts all sessions)

How to eliminate the command? Click rules-> Automatic Breakpoint->disabled

The second type: Enter the command at the command line: Bpafter www.baidu.com (This method only interrupts www.baidu.com)

How to eliminate the command? Enter command bpafter on the command line,

The exact usage is similar to that in the previous section, not much.

Creating Autoresponder rules in Fiddler

Fiddler's Autoresponder tab allows you to return files locally without sending an HTTP request to the server.

See an example. 1. Open the Blog home page, the blog Park logo image to local, and make some changes to the picture.

2. Open the Fiddler to find the logo image of the session, Http://static.cnblogs.com/images/logo_2012_lantern_festival.gif, drag the session to Autoresponer tab

3. Select Enable automatic reaponses and unmatched requests passthrough

4. Select the Find a file below the rule Editor ...  Select a locally saved picture. Finally click Save.

5. Re-use IE Blog home page, you will see the homepage of the picture with the local.



How to filter sessions in Fiddler

Each time using fiddler, open a website, can see in the Fiddler dozens of sessions, see dazzling. The best way to do this is to filter out some conversations, such as a session that filters out images. Fiddler in the filter function, in the Right Filters tab, there are many options, a little research, you know how to use.

Session compare function in Fiddler

Select 2 sessions, right click Compare, you can use WinDiff to compare two sessions (of course you need to install WinDiff)

The encoding gadget provided in Fiddler

Click Textwizard on the Fiddler toolbar, this tool can encode and decode string.

Query session in Fiddler

Use the shortcut key ctrl+f to open the Find Sessions dialog box and enter the keyword to query the session you want. The query to the session is displayed in yellow

Save session in Fiddler

Sometimes we need to save the conversation so that we can send it to someone or analyze it later. The steps to save the session are as follows:

Select the session you want to save, then click File->save->selected Sessions

Fiddler's script system

The most complicated thing about Fiddler is the script system. Official Help Document: Http://www.fiddler2.com/Fiddler/dev/ScriptSamples.asp

First install the Syntaxview plug-in, inspectors tab->get Syntaxview tab->download and install Syntaxview now ... Such as

After the installation is successful, Fiddler will have a fiddler Script tab, such as

In it we can write a script, and see an example to make all cnblogs sessions appear red.

Place the script under the Onbeforerequest (osession:session) method and click Save Script

     if (Osession.hostnameis ("www.cnblogs.com")) {            osession["ui-color"] = "red";        }

So all the Cnblogs sessions will show red.

How to use fiddler when you debug a Web site vs.

We also need to use Fiddler to analyze HTTP when we are developing an ASP with visual Stuido, and by default fiddler is not able to sniff localhost's web site. But if you add a dot behind localhost, fiddler can sniff.

For example: the original ASP. NET address is http://localhost:2391/Default.aspx, add a dot number, become http://localhost.:2391/Default.aspx can

A second option is to add 127.0.0.1 Localsite to the Hosts file.

How do you access the Http://localsite: port number. So the fiddler can be intercepted.

Response is garbled.

Sometimes we see that the HTML in response is garbled, because HTML is compressed, and we can decompress it in two ways.

1. Click on the "Response is encoded" Response raw above "any could need to be decoded before inspection." Click here to transform "

2. Select "Decode" in the toolbar. This will automatically decompress.

Attached: Fiddler series tutorials, (in serial, please look forward to)

Fiddler (i) tutorial

Fiddler (ii) Script usage

Fiddler (iii) composer create and send HTTP Request

Fiddler (iv) realize the clutch of mobile phone

Fiddler (v) Use Fiddler under Mac

Fiddler (vi) The most commonly used shortcut keys

Http://www.cnblogs.com/TankXiao/archive/2012/02/06/2337728.html

Fiddler is one of the most powerful Web debugging tools available--Web Capture analysis

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.