官方版
Add Rules to Fiddler
Customize Rules
To add custom columns to the Fiddler UI, modify requests or responses, test application performance, and a variety of other custom tasks, add rules to Fiddler’s JScript.NET CustomRules.js file in FiddlerScript.
- Click Rules > Customize Rules….
- Enter FiddlerScript code inside the appropriate function.
- Save the file.
Fiddler will automatically reload the rules.
Use Additional .NET Assemblies
To use additional .NET assemblies in your script:
- Click Tools > Fiddler Options.
- Click the Extensions tab.
- Edit the References list.
- Either:
- Register the assembly in the GAC; or
- Copy the assembly to the folder that contains Fiddler.exe.
- Register the assembly in the GAC; or
To use the new assembly’s functions without fully-qualifying them, update the #import clause at the top of the script.
Change the JScript Editor Launched from the Rules Menu
- Click Tools > Fiddler Options.
-
Restore Default Rules
Delete the CustomRules.js file in ~/Documents/Fiddler2/Scripts.
- Restart Fiddler.
Note: Fiddler’s default rules are stored in ~/Program Files/Fiddler2/Scripts/SampleRules.js.
谷歌翻译版
为Fiddler添加规则
Customize Rules
要将自定义列添加到Fiddler UI,修改请求或响应,测试应用程序性能以及各种其他自定义任务,请在FiddlerScript中向Fiddler的JScript.NET CustomRules.js文件添加规则。
- 点击 Rules > Customize Rules….
- 在适当的函数内输入FiddlerScript代码。
- 保存这个文件。
使用其他.NET程序集
要在脚本中使用其他.NET程序集,请执行以下操作:
- 点击 Tools > Fiddler Options.
- 单击 Extensions 选项卡.
- 编写 References 列表.
- 要么:
- 在GAC中注册程序集; 要么
- 将程序集复制到包含Fiddler.exe的文件夹中。
要在不完全限定新程序集功能的情况下使用它们,请更新脚本顶部的#import子句。
更改从Rules菜单启动的JScript编辑器
- 点击 Tools > Fiddler Options。
-
恢复默认的Rules
删除〜/ Documents / Fiddler2 / Scripts中的CustomRules.js文件。
- 重新启动Fiddler
注意:Fiddler的默认规则存储在〜/ Program Files / Fiddler2 / Scripts / SampleRules.js中。