官方版
Build a Custom Inspector
- Create a Fiddler extension project.
- Change the code to derive from the Inspector2 class and implement either IResponseInspector2or IRequestInspector2. ```vbnet using Fiddler;
[assembly: Fiddler.RequiredVersion(“2.3.0.0”)]
public class WebViewer: Inspector2, IResponseInspector2 { public Viewers() { // // TODO: Add constructor logic here // } }
1. Inside the class, create a new method. By typing **public override**, you'll get an autocomplete list of the methods you need to write.<br />
1. In **Solution Explorer**, right-click on the project and click **Add > User Control**.<br />
1. Use the **Toolbox** to add controls to your user control. These will show the data about the HTTP message under inspection.<br />
1. In the **body{ set }** and **headers{ set }** properties, you should update your control's visual representation of the request or response.<br />
1. [Compile and load your extension in Fiddler](https://docs.telerik.com/fiddler/Extend-Fiddler/LoadExtension).
<a name="Vqqjw"></a>
# 谷歌翻译版
<a name="Xp6rd"></a>
# [建立自定义Inspector](https://docs.telerik.com/fiddler/Extend-Fiddler/CustomInspector#build-a-custom-inspector)
1. 创建一个 [Fiddler 扩展项目](https://docs.telerik.com/fiddler/Extend-Fiddler/CreateExtension).
1. 更改代码以从Inspector2类派生并实现IResponseInspector2或IRequestInspector2。
```vbnet
using Fiddler;
[assembly: Fiddler.RequiredVersion("2.3.0.0")]
public class WebViewer: Inspector2, IResponseInspector2
{
public Viewers()
{
//
// TODO: Add constructor logic here
//
}
}
- 在类内部,创建一个新方法。通过输入public override,您将获得一个需要编写的方法的自动完成列表。
- 在“解决方案资源管理器”中,右键单击项目并单击Add > User Control。
- 使用工具箱将控件添加到用户控件。这将显示有关所检查的HTTP消息的数据。
- 在body{set}和headers{set}属性中,您应该更新控件的请求或响应的可视化表示。
- 在Fiddler中编译和加载扩展。