Internet Explorer 8 and above come with a function called Developer Tools which allow you to switch the rendering engine between different versions of IE (version 7 and above). This is useful for debugging CSS in IE (the horror) and there are plenty of other plugins/third-party software that let you do much the same thing if you don’t like using IE (who does).
However, debugging JavaScript in IE requires that you be able to switch the JavaScript engine between different versions of IE. Many of the IE debugging tools (including Developer Tools) doesn’t replicate the old JavaScript engines. Luckily there’s a tool called IETester that lets you test both the rendering engine and the JavaScript engine of IE 5.5 all the way to the latest version of IE.
IETester is really easy and intuitive to use and lets you test any number of sites and any number of versions at the same time. It also has a feature to disable caching like any good debugging tool should.