Fiddler for Mac edition developed by mobile

Source: Internet
Author: User

Where is mobile development troublesome? Debugging, like early JavaScript, is currently one of its biggest headaches. Especially on Mac, you must know that software on Mac is not cheap, in Windows, you can use Fiddler to intercept, delay, and other operations. Is there such a free tool in Mac? Of course, today we will introduce you to the auto_response. Click here to go to git and check it out.

The installation method is very simple. Open the terminal and enter:

Gem install 'Auto _ response'

And its main Commands are as follows:

Ar start
Ar status # Check Server Status
Ar stop # Stop Proxy Server

Back to the question: After the installation is complete, you need to set up a proxy. We recommend that you use Chrome plug-in switchysharp to create a scenario and manually configure the HTTP proxy to port 9000. Open the auto_response configuration file and run the following command:

Open $ home/. auto_response/Rules

Edit it through the opened configuration file (I opened it in xcode by default). The watch in the configuration file is very detailed. Here we mainly talk about how to intercept files to read local resources, because most page data may depend on the service environment or directly browse files on the server after a bug occurs, debugging may need to block online JS or CSS files to the local device, to achieve the debugging effect. For example, if we want to intercept the next JS file and a CSS file of Baidu (the path is casually written here), we can do this and enter:

URL "http://baidu.com/test.js"
Goto "/users/zimo/projects/test. js"

URL "http://baidu.com/test.css"
Goto "/users/zimo/projects/test.css"

In this way, when the browser accesses the two addresses or pages containing the two addresses, the file actually reads Beni. However, note that during access, you need to open the proxy through switchysharp and the AR start tool.

How can we configure it on mobile? There are two simple methods: VPN. Here, ipone is used as an example. Choose Settings> General> VPN, enable VPN, set proxy to manual mode, and enter the local IP address, enter "9000" in the port number. Save the file and access the two files or the pege that contains the files in the same way as the PC. Also, find Settings> unlimited Lan> click "use WiFi, like setting VPN, click the HTTP proxy at the bottom and enter the above information to save it;

Do we miss something? Don't worry about network latency. In fact, it's very simple, just like Fiddler. You just need to add it to the configuration file:

URL "http://baidu.com"
Delay 5

Five of them are latency events. You can try them.

In addition, it can capture data packets through auto_response like Fiddler. The specific method is as follows:

Ar start-T

Then, open the browser http: // 127.0.0.1: 9090, refresh the http://baidu.com on the phone to get the data packet, at the same time the console can output the Print message, combined with Safari development tools, you can see who dares to say that Mac is a straw package.

Fiddler for Mac edition developed by mobile

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.