Reputation: 15726
Currently, I don't really have a good method of debugging JavaScript in Internet Explorer and Safari. In Firefox, you can use Firebug's logging feature and command Line functions. However, this doesn't help me when I move to other browsers.
Upvotes: 18
Views: 7114
Reputation: 42543
The best method I've used for debugging JavaScript in Internet Explorer is through the Microsoft Script Editor. The debugger is full featured and very easy to use.
The article bellow teaches how to install the Microsoft Script Editor and configure it.
HOW-TO: Debug JavaScript in Internet Explorer
for Safari, sorry no answer...
Upvotes: 1
Reputation: 30518
There is now a Firebug Lite that works on other browsers such as Internet Explorer, Safari and Opera built. It does have a limited set of commands and is not as fully featured as the version in Firefox.
If you are using ASP.NET in Visual Studio 2008 will also debug JavaScript in Internet Explorer.
Upvotes: 0
Reputation: 41480
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.
Upvotes: 2
Reputation: 2254
See the Debugging chapter of the Safari User Guide for Web Developers for full documentation of how to debug in Safari. (For the most part it is the same API as Firebug.)
In IE you can use the IE Dev Tools, but I prefer Firebug Lite as others have mentioned.
Upvotes: 0
Reputation: 1029
Visual Studio 2005 has the Script Explorer (under the Debug > Windows menu). It shows a tree of all the scripted stuff that's currently debuggable. Previously I was breaking into the debugger via IE's View > Script Debugger menu, but I'm finding the Script Explorer is a quicker way to get to what I want.
Upvotes: 1
Reputation: 36763
Safari 3.1 doesn't need any magical commandline preferences -- the Advanced tab of the preferences window has an enable develop menu checkbox. That said if you can use the webkit nightlies (http://nightly.webkit.org), you're probably better off doing that as the developer tools are vastly improved, and you can more easily file bug reports requesting features that you want :D
Upvotes: 0
Reputation: 2340
This is the Firebug Lite that @John was referring to that works on IE, Safari and Opera.
Upvotes: 6
Reputation: 6535
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.
Upvotes: 13
Reputation: 55086
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..
Upvotes: 1