问题
Fiddler manages to log all my PC HTTP traffic, but when I run Android emulator and start browsing web though emulator, nothing gets logged.
Why isn't Fiddler logging Android emulator browser HTTP traffic?
回答1:
Emulator has to be aware of Fiddler, just like your normal PC browsers are. When you want Fiddler to log your IE activity, you have to set up Fiddler as a IE proxy (actually, it happens automatically, but still).
- Here's some info on how to manually link Fiddler with browser: http://www.fiddler2.com/fiddler/help/hookup.asp
- Here's some info on how to set up proxy in Android Emulator: How to setup Android emulator proxy settings?
- Here's all in one: http://aurir.wordpress.com/2010/03/22/tutorial-getting-android-emulator-working-with-fiddler-http-proxy-tool/
回答2:
Please see the detailed instructions in this video: How To Configure Fiddler Proxy for Android Studio Emulator (HTTP/HTTPS) I use Fiddler v4.6.20171.9220 and it works for me.
NOTE: http_proxy env variable may be affecting other program's ability to connect to the internet, make sure remove the variable when not needed.
来源:https://stackoverflow.com/questions/7371570/logging-http-requests-responses-with-fiddler-on-android-emulator