Debugging JavaScript in Internet Explorer and Safari

A post on the IE Blog, Scripting Debugging in Internet Explorer, explains different options for script debugging in Internet Explorer.

Here is the Apple Developer FAQ on debugging JavaScript in Safari.


For Safari you need to enable the "Develop" menu via Preferences (in Safari 3.1; see the entry in Apple's Safari development FAQ) or via

$ defaults write com.apple.Safari IncludeDebugMenu 1

at the terminal in Mac OS X. Then from the Develop menu choose Show Web Inspector and click on the Console link. Your script can write to the console using window.console.log.

For Internet Explorer, Visual Studio is really the best script debugger but the Microsoft Script Debugger is okay if you don't have Visual Studio. This post on the IE team blog walks you through installing it and connecting to Internet Explorer.

Internet Explorer 8 looks like it will have a very fancy script debugger, so if you're feeling really adventurous you could install the Internet Explorer 8 beta and give that a whirl.


Safari 3.0 and 3.1 include the Drosera JavaScript debugger, which you can enable on the Mac by following the instructions at that link. There's also the Safari Web Inspector..


This is the Firebug Lite that @John was referring to that works on IE, Safari and Opera.