Fiddler远程捕获Android/iPhone的请求

Android 或者 iPhone 上 APP 的请求对用户来说是不可见的,不像 PC 上用浏览器 F12 可以很方便的调试,我们有没有办法去调试呢?

答案必然是有的,那就是 Fiddler 的代理可以支持 APP 远程连接与抓包调试。过程如下:

(1)Start Fiddler then open the Fiddler Options window

(2)and in the Connections tab, ensure Allow remote computers to connect is checked.

(3)In the Connections tab, check Act as system proxy on startup and verify what port is set (eg. 8888).

Once you’ve saved those settings you need to stop and re-start Fiddler.

160437_pmLR_568818

(4)Once Fiddler has re-started, verify that the Capture Traffic menuitem is ticked.

(5)You need to know your computer’s wireless-network IP address to configure the iPhone. This screenshots shows the Command Prompt > ipconfig output:

(6)With the computer IP address and Fiddler port, go to your iPhone/Android’s Wifi Settings and scroll down to the HTTP Proxy, choose Manual and input the Fiddler proxy info:

Note:if you change  iPhone/Android’s Wifi Proxy Settings,you must re-connect your wifi to effect.

004143_pNq9_568818

(7)If everything has been setup right, anything you do in Safari or other internet applications (like, say Microsoft Tag Reader) will be logged in the Fiddler window.

004426_Ht66_568818

It’s extremely useful for testing/debugging – have fun!

原文来自:http://my.oschina.net/leejun2005/blog/399108


关注我

我的微信公众号:前端开发博客,在后台回复以下关键字可以获取资源。

  • 回复「小抄」,领取Vue、JavaScript 和 WebComponent 小抄 PDF
  • 回复「Vue脑图」获取 Vue 相关脑图
  • 回复「思维图」获取 JavaScript 相关思维图
  • 回复「简历」获取简历制作建议
  • 回复「简历模板」获取精选的简历模板
  • 回复「加群」进入500人前端精英群
  • 回复「电子书」下载我整理的大量前端资源,含面试、Vue实战项目、CSS和JavaScript电子书等。
  • 回复「知识点」下载高清JavaScript知识点图谱

每日分享有用的前端开发知识,加我微信:caibaojian89 交流