Fiddler Extension Development Tips

I recently created a custom Fiddler extension called PowerBIFiddler. Here are a few tricks that I learned along the way.

Re-use Default Fiddler Inspectors

For PowerBI-Fiddler, I wanted to re-use the JSONResponseViewer that Fiddler uses for their “JSON” inspector. I used JustDecompile to decompile Fiddler.exe and discovered that the default inspectors are located in this DLL: C:\Program Files (x86)\Fiddler2\Inspectors\Standard.dll. The JSONResponseViewer is sealed, so you have to use a composition pattern instead of inheritance. You can see an example here: https://github.com/jongio/PowerBIFiddler/blob/master/PowerBIFiddler/TileDataViewer.cs

Inspector loading

Fiddler searches %userprofile%\Documents\Fiddler2\Inspectors and C:\Program Files (x86)\Fiddler2\Inspectors for Inspectors when it launches. You’ll want to copy your custom Inspectors into either of those folders. I setup the following Post-build event to automatically copy the DLL over after each build.

mkdir "%userprofile%\My Documents\Fiddler2\Inspectors\"
copy "$(TargetPath)" "%userprofile%\My Documents\Fiddler2\Inspectors\$(TargetFilename)"
copy "Newtonsoft.Json.dll" "%userprofile%\My Documents\Fiddler2\Inspectors\"

Debugging

To get F5 debugging, you’ll want to set your Start Action to Fiddler.exe, like this:

**
**

Learn by Decompiling Existing Extensions

You’ll find a bunch of good examples here: http://www.telerik.com/fiddler/add-ons. You can install them and then use JustDecompile to see how they were built.

Jon