一、添加断点
1、用Charles抓包发起一次接口请求
2、对要打断点的请求右键,选择“Breakpoints”![](https://img-my.csdn.net/uploads/201603/24/1458825781_5223.jpg)
![](https://img2020.cnblogs.com/blog/1957101/202009/1957101-20200902104317768-1834574814.png)
二、Charles断点设置
1、点击Charles菜单-Proxy-Breakpoints,此时会弹出 BreakpointsSettings 对话框
![](https://img-my.csdn.net/uploads/201603/24/1458825788_8445.jpg)
![](https://img-my.csdn.net/uploads/201603/24/1458825788_8445.jpg)
![](https://img2020.cnblogs.com/blog/1957101/202009/1957101-20200902104410930-1746253207.png)
2、双击【Location】内的接口地址,此时会弹出 Edit Breakpoint 对话框
3、在【Query】项输入:*
4、如果我只需要修改返回的参数,就只勾选Response
![](https://img-my.csdn.net/uploads/201603/24/1458825761_3824.jpg)
![](https://img-my.csdn.net/uploads/201603/24/1458825761_3824.jpg)
![](https://img2020.cnblogs.com/blog/1957101/202009/1957101-20200902104511654-400308186.png)
三、修改接口返回值
1、再次发起接口请求,此时会弹出下面的对话框
2、点击【Edit Response】,修改返回的报文
![](https://img2020.cnblogs.com/blog/1957101/202009/1957101-20200902104550043-1784566631.png)
3、修改完成后,点击底部的【Execute】将修改后的报文返回
![](https://img-my.csdn.net/uploads/201603/24/1458825830_5868.jpg)
![](https://img-my.csdn.net/uploads/201603/24/1458825830_5868.jpg)