Fiddler grabs packets and quickly displays time-consuming columns, request initiation columns, etc

When we use Fiddler to grab packets, the request list on the left will lack some data, which leads to the lack of intuition. We can add some columns we need, such as request consumption time, etc., here we need to use the script function provided by fiddler,

I found the Internet, but it's not what I want. I studied it on Fiddler's official website, and wrote a blog to keep it:
The official website has all the properties of Session:

Open Fiddler, click "Rules" = "Customize Rules..." , find Class Handlers in the pop-up edit window, and then add the following codes (the following codes also explain the meaning of each period of time added):

class Handlers
    // Display the request initiation time of each line: hours, minutes, seconds and milliseconds
    public static BindUIColumn("BeginTime", 80)
    function BeginTimingCol(oS: Session){   
        return oS.Timers.ClientDoneRequest.ToString("HH:mm:ss.fff");

    // Display the response time of each request line: hours, minutes, seconds and milliseconds
    public static BindUIColumn("EndTime", 80)
    function EndTimingCol(oS: Session){     
        return oS.Timers.ServerDoneResponse.ToString("HH:mm:ss.fff");

    // Show the server time of each request line
    public static BindUIColumn("Time Taken", 80)
    function CalcTimingCol(oS: Session){  
        var sResult = "0";                  
        if ((oS.Timers.ServerDoneResponse > oS.Timers.ClientDoneRequest)) {  
            sResult = (oS.Timers.ServerDoneResponse - oS.Timers.ClientDoneRequest).TotalMilliseconds.ToString("N0");
        return sResult + "ms";  

    // Show server IP requested per line
    public static BindUIColumn("ServerIP", 80)
    function xxxdColumn(oS: Session): String {
        return oS["X-HostIP"];

    // Show METHOD requested per line
    public static BindUIColumn("Method", 40)
    function FillMethodColumn(oS: Session): String {
       return oS.RequestMethod;             

The screenshot of the operation steps is as follows. You can see the data effect of the added 5 columns:

You can drag each column title by yourself and choose the order you like to arrange

Tags: Session

Posted on Fri, 10 Jan 2020 14:09:36 -0500 by jude0311