I'm trying to create a fiddler Inspector2 and IFiddlerExtension in the same assembly. However, I can't get the extension to load if I host the assembly in the /Fiddler2/Inspectors/ folder and the inspector won't load when hosted in the /Fiddler2/Scripts assembly. Alternately, is there a way to manually inject, let's say, the inspector in the OnLoad code in the extension (or vice versa)?
I suspect the answer is no, but does someone know if it is possible to get Fiddler to load both types from the same assembly?
Background: I'd like to be able to provide an inspector that will provide some visualization of a given response, while an extension hosts a new tab that will configure and provide analysis over the entire set of sessions.
If I need separate assemblies, I will likely need three since I'll have common code factored into a shared assembly and then the two assemblies to be put in different locations. It's a lot of extra work for a small assembly with only a handful of types.
You're correct to note that Fiddler's partitioning of extension types makes it difficult to offer both FiddlerExtensions and Inspectors in a single assembly today.
Technically, there's nothing stopping your Inspector object from manually creating and managing a top-level tab, since the primary point of the IFiddlerExtension
interface is to get your code loaded in the first place, and Inspectors are already loaded anyway.
In the future, this could conceivably be problematic as I hope to offer "delay-loaded" extension types, but that feature would almost certainly be opt-in and thus not likely to break you.