Click here to Skip to main content
15,885,216 members
Articles / Operating Systems / Windows

How to Debug in IE on a Mac

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
10 Apr 2012CPOL2 min read 12.4K  
Here's how to configure a Mac to debug web sites in IE

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

This article was originally posted at http://tatiyants.com?p=1874

License

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


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --