I had the need to debug javascript in IE7. After the Spoon studio distribution didn’t work for me in 64bit Windows 7, I decided to try the VM approach. Here are 50 simple steps to debugging Javascript in IE7 in a Virtual PC Virtual Machine.
* Download Virtual PC without XP Mode.
* Download IE7 VHD.
* Create a new VPC pointed to the VHD.
* upgrade the vpc integration components.
* defer the reboot.
* Install web developer toolbar.
* install Visual Studio WEb Dev Express 2010 which requires…
* WebPI which requires…
* .NET 2.0
* which fails because of the pending integration components installation.
* reboot.
* watch the upgrade fail when it prompts you for a XP CD ROM.
* Be happy that now you have no intergration components…
* Your mouse it now captured in the VPC window…
* be in awe of how much slower IE7 browsing is without the integration components.
* ITs so slow its going to be unusable for actual work so try installing the integration components again.
* Watch the installer simply fail with no explaination.
* Try WebPI again, even though it will be slow.
* be amazed at how long it takes to ngen System.Design.
* reboot after .net2.0 install.
* reboot after microsoft installer installation.
* be in awe of how long it takes SQL Express 2008 to install.
* reboot after web developer express partly installs.
* be in awe of how long you still have to wait for WebDevExpress to install.
* now that it is all done, try once more for the integration tools.
* get prompted for the CD again for usbhub.sys.
* search your system for this file. c:\> dir /s usbhub.sys
* curse when it is missing.
* google it (you don’t bing it at this point because of MSFT anger).
* after much clicking find this awesome post http://superuser.com/questions/244659/where-can-i-find-windows-xp-sp3-as-a-zip-file.
* nearly get a virus trying to get usbd.sys from memers.driverguide.com.
* find usbd.sys at sysfiles-download.com.
* complete integration components installation.
* wonder what this RemoteApp redirect is… sounds like Unity Mode on a mac for XP in Win7.
* reboot (to complete integration components installation).
* start Visual Web Developer and be in awe of how slow that first time launch is in a VM.
* Create an empty ASP.net web app and click run.
* see the 404 in IE7 and be happy because your browser is now attached to the VWD debugger.
* browse your site with the JS that kills IE7.
* click debug when IE7 prompts you.
* go back to VWD and see the JS open with cursor on the line with the error and no error message and no exception or other information about what is wrong with the JS.
* find a corner.
* sit down.
* curl into fetal position.
* rock yourself gently.
* sing yourself a slow and calm song.
* remember that you go home at 5pm and don’t think about software again until 9am tomorrow.
* be glad you aren’t one of those "passionate" devs that never stops thinking about software.
* think of your children.
* ask a coworker who knows js better than you and let them point to where you don’t have valid js.