Process Filtering with Fiddler

The built-in Show only traffic from option is useful if your process never exits and always has the same PID. In my case, my HTTP client was starting and exiting frequently, so I added this custom FiddlerScript.

Go to Rules > Customize Rules... to start editing CustomRules.js.

Add this inside the Handlers class

class Handlers
{
    RulesString("&Process filter", true)
    RulesStringValue(0, "&Chrome", "chrome")
    RulesStringValue(1, "&Firefox", "firefox")
    RulesStringValue(2, "&Internet Explorer", "iexplore")
    RulesStringValue(3, "&Opera", "opera")
    RulesStringValue(4, "&PhantomJS", "phantomjs")
    RulesStringValue(5, "&Custom...", "%CUSTOM%")
    public static var sProcessName: String = null;

    // leave the rest of the Handlers class as-is
}

Add this inside the OnBeforeRequest function

static function OnBeforeRequest(oSession: Session) {
    if (null != sProcessName) {
        var processInfo = oSession["X-PROCESSINFO"];
        if(!processInfo || !processInfo.StartsWith(sProcessName + ":")){
            oSession["ui-hide"] = "true";
            FiddlerObject.StatusText = " Process filter: " + sProcessName;
        }
    }

    // leave the rest of the OnBeforeRequest function as-is
}

Fiddler will apply your changes as soon as you save the CustomRules.js file.

To use, go to Rules > Process Filter and choose a browser, or use Custom and type in your executable's basename (e.g. iexplore).

Filtering applies to requests that start after you choose a process. Previous requests and Fiddler Composer requests are not affected.


Basically a duplicate of Filter Fiddler traffic . Just go to the Filters tab in Fiddler and then the "Client Process" fieldset and then choose "Show only traffic from " and choose the appropriate process.