Click here to Skip to main content
Click here to Skip to main content

How to Debug in IE on a Mac

By , 10 Apr 2012
Rate this:
Please Sign up or sign in to vote.

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:

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

AlexTatiyants

United States United States
No Biography provided
Follow on   Twitter   Google+

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web02 | 2.8.140415.2 | Last Updated 10 Apr 2012
Article Copyright 2012 by AlexTatiyants
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid