How to set up a proxy on Charles (so you can test other devices on your local dev machine)
Have you ever wondered, how do I test my fixes/changes on my local machine on IE 11? Or in general, how do I test my fixes/changes on my local machine, when I don’t actually have that browser on my laptop? If so, the Charles Proxy tool might be your answer.
- A few years ago I learned this and I thought this could be useful for you if any of the below apply to you: You are developing on a Mac and want to test Internet Explorer 11 or Microsoft Edge on your local machine You want to test your fixes on a (physical) mobile device, with fixes done on your local machine You don’t have access to a mobile device/internet browser simulator like Browserstack or Perfecto
For this I’m going to explain how to set this up using your development laptop and a “test device” 1. Download Charles https://www.charlesproxy.com/download/ and install this on your laptop where you do your development 2. Make sure both the laptop and the test device are on the same internet network 3. Get your IP address from your laptop (you need your internal IP address, not the public facing one) 4. On your test device, go to your internet settings and enable HTTP proxy manually. In the server field enter the IP address of your laptop and in the port type in 8888 (port types must match in Charles and the one you enter in your test device, you can also enter 8080 in both) 5. In Charles, click on the Proxy menu, then click Proxy settings - then see the checkboxes etc as below.
6. Once you click OK. Go back to your test device and access your normal localhost URL - you should be able to see your traffic in Charles.