I and most devs I know really dislike Internet Explorer. We dislike it because it makes our lives needlessly painful by forcing us to pay the IE tax: spending time and energy making our web sites work in it.
Yet no matter how we feel about IE, we probably can’t just ignore it (unlike some lucky bastards). To add insult to injury, non-Windows devs have to go through quite a bit of hassle to get IE on their boxes. For instance, here’s what I had to do to get my Mac configured to debug in IE:
1. Install VirtualBox
VirtualBox is an Open Source VM from Oracle. It’s easy to set up and works pretty well. You can get the Mac image here.
2. Get Windows Images
Greg Norton created a really nice utility which automates installing Microsoft IE virtual machines on VirtualBox. You can install all IE images by running the following command:
curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash
Alternatively, you can install specific versions of IE:
curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | IEVMS_VERSIONS="7" bash
curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | IEVMS_VERSIONS="8" bash
curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | IEVMS_VERSIONS="9" bash
Please note that installing these images will take quite a bit of time, especially if you’re installing all of them (it took over 2 hours on my machine).
3. Configure Localhost on Windows
Finally, to make your debugging experience more pleasant, it would help if the Windows VM could recognize a localhost website running on the Mac. For reasons I wasn’t able to clarify, http://10.0.2.2 will allow you to reference localhost.
To make it work correctly, just add the following line in your C:\windows\system32\drivers\etc\hosts file:
10.0.2.2 localhost
Note that I had to set my networking setting in the VirtualBox VM to NAT for this to work correctly. Your mileage may vary.
Sources:
You May Also Like