Partilhar via


How to use Fiddler Autoresponder to replay a fiddler trace?

In this quick tutorial, we want to show you how to use Fiddler’s Autoreponder to replay a previously captured or generated fiddler trace when trying to isolate html code performance or page errors. The Fiddler AutoResponder is an excellent way to replay and reproduce a particular scenario, which makes troubleshooting a lot easier and less invasive when working out of production environments.

Prerequisites: Collect a fiddler trace. To learn more about this tool, visit the official fiddler site here.

COLLECTING A FIDDLER TRACE:

  • First, download and install most recent version of the Fiddler tool:         
  • To start the Fiddler tool, click Start, point to All Programs, and then click fiddler.   
  • Make sure you clear your Internet Explorer cached files. You have different ways to do this from fiddler:
    • by using the keyboard shortcut CTRL+SHIFT+X
    • from the Tools/Clear WinINET cache CTRL+SHIFT+X menu
    • or click on the Clear Cache button         
  • In the Fiddler window, click on File and select the “Capture Traffic” option to stop logging.                      
  • Click on Tools and select ‘Fiddler Options’. On the General tab check the box next to ‘Decrypt HTTPS traffic’
  • Click on Edit and select ‘Remove’ and select ‘All sessions’ to clear out the previously captured data.   
  • Now that the Fiddler trace file is running, reproduce the case scenario to capture the needed information.                                                                       
  • After the capture of the reproduction of your issue, save the captured. First Stop it from File menu, click Capture Traffic to stop the data collection.             
  • On the File menu, click Save / All Sessions…                                                                                                                                  
  • In the file name, type a friendly name: filename.saz to save the HTTP Fiddler trace file.                  
  • Save the file to the folder that you want.                                                                                                          

STEPS

The first step once you have open the fiddler log is to clear your Internet Explorer cached files from your system. You have different ways to do this from fiddler: 

  • by using the keyboard shortcut CTRL+SHIFT+X
  • from the Tools/Clear WinINET cache CTRL+SHIFT+X menu
  • or click on the Clear Cache button

Next: We need to enable AutoResponder. From the right pane, click on the AutoResonder tab

 

Next: Click on the “Enable automatic responses” and the “Unmatched requests passthrough” activate these options.

The Enable automatic responses checkbox controls whether the AutoResponder is active. When this option is unchecked, the rest of the tab is disabled.

The Unmatched requests passthrough option controls what happens when a Session does not match any of the specified rules. When ticked, unmatched requests are sent to the server normally, as if the AutoResponder feature didn’t exist. When unticked, Fiddler will generate a HTTP/404 Not Found response for any unconditional HTTP request that does not match any of the rules. If a client sends a conditional request containing If-None-Match or If-Modified-Since headers, the AutoResponder will return a HTTP/304 Not Modified response.

 

 

Next: Focus on the left hand pane to select all traffic items and drag and drop on the right hand AutoResponder Pane by using the keyboard shortcut Ctrl+A key (Select all sessions) or use the Edit/Select All menu.

NOTE: Before you drag and drop the web sessions into the AutoResponder Pane, clear all HTTP 401 and HTTP 407 responses by deleting it. You can also uncheck it from the AutoResponder pane!

TIP: One technique that can be used to quickly remove the 401 and 407 responses is to sort the packets by the response code column. You can then easily find and remove them since they’re grouped together. Be sure to sort it back by the packet # column before dragging the packets into the AutoResponder pane.

About HTTP Authentication: With HTTP Authentication, the client makes a HTTP request and the server responds with a HTTP/401 or HTTP/407 response demanding credentials. HTTP/401s are sent by servers that require authentication, while HTTP/407s are sent by proxy servers and when replaying the web sessions you may not have access to these credentials and why you would want to removed it from the replay for troubleshooting purposes.

 

 

Next: Drag and drop the items to the AutoResponder panel (right side pane)

 

 

Next: From the top menu, select File/Capture Traffic or F12 to activate the capture and start replaying the captured web sessions.   

NOTE:

Multiple POST requests with the same url and urls that contain time sensitive information will pose problems when playing back the trace. To get around the POST problem in most situations, you can disable the earlier POST requests as you go through the playback repro (you may even consider adding a 5s latency so you can disable it in real time before it automatically makes the next POST request for that url). To get around the time sensitive url problem, you may need to modify the actual HTML or javascript.

 

 

In summary:

You would normally want to replay a page you are troubleshooting first and see if you are able to reproduce the reported behavior. The nice thing about this tool is that you can manipulate many things including browser agents, script, css images, introduce latency and more…

 

Hope you enjoy this quick blog post on using AutoResponder!

 

This blog has been provided to you by The IE SDK Support Team.

Comments

  • Anonymous
    January 08, 2013
    A few side-notes:It's important to remember that when you are 'replaying' Fiddler traces on a different machine than the one on which it was initially gathered, you will have to have any content-required ActiveX controls and/or Java classes installed on that machine as well.  Otherwise, certain content may not render properly or generate the same application workflow as it would on the original client.Also keep in mind that by default, Fiddler captures Wininet-based HTTP/HTTPS traffic.  For application code which leverages WinHTTP, you will have to modify your WinHTTP proxy settings and temporarily configure them to use the 127.0.0.1 address and the port on which Fiddler is monitoring (:8888 by default).  Without all of the application workflow captured, playback may be only partially successful.