Secret to Debugging JavaScript in Safari
February 2, 2006
The only major problem I’ve had with Apple’s Safari web browser has been its annoying lack of ability in debugging javascript. However, I was wrong to complain about that. Safari has a very good, detailed “Debug” menu which is far superior to any of the default debug abilities in any of the other major browsers. (This is of course without any plug-ins such as the Web Developer or Firebug in Firefox)
The problem really is that the “Debug” menu is disabled by default for everyone.
Safari Enhancer solves that problem. Install this simple program and with a single checkbox you can show all the nice goodies Apple has been hiding from us.
Tags: apple,mac,safari,plug-in,add-on,plugin,addon,javascript
Comments
10 Responses to “Secret to Debugging JavaScript in Safari”
Got something to say?

From the Safari Developer FAQ:
Unfortunately, the JavaScript debugger in Safari is as bad as the default error messages in Internet Explorer. But, being able to output to the console really makes up for it (almost). You can just do:
window.console.log("hello world");ooh, that’s even cleaner than the application I got, I’ll definitely use that method at home!
[...] Debugging difficult (not entirely true) [...]
I use javascript debugger everyday.
The best javascript debugger I saw so far is Microsoft’s Script Editor. If you have MS Office, it’s likely you already have it.
Firefox Venkman is ok, although not as user friendly.
Most of Safari debugging “tools” are useless. Most of the time I have to use javascript alerts to debug on Safari.
In Safari, If i need to get the value as
document.list_form.guarantorPersValuesSpain.value =2;
alert(”testing result 1=”+ test );
test += 2;
alert(”testing result 2=”+ test );
It results
————
testing result 1=
testing result 2= 2
why the first alert value is blank and second alert has not resulted as “22″.
Can anyone resolve it??
Thanks & regards,
Pooja
Safari debug is shitty and useless
Safari for developers is crap. Drosera freezes regularly and the debugging tools have got to be the crappiest ive seen yet. No comparison to firebug… frustrating to say the least. Stop trying to reinvent the wheel, and take some notes on what works.
Thanks for the article… it helped me find something that’s been eluding me for months. We write some crazy Javascript at my job, and debugging it in the Windows version of Safari is/has/was/been hell. Following link shows how to turn on the debug menu for the Windows Safari beta.
http://www.macosxhints.com/article.php?story=20070611144942562
The biggest problem I have with Safari debugging is the inability to set breakpoints and get stack traces. Is there a Safari debugger that supports this?
http://macdevelopertips.com/safari/firebug-like-tools-in-safari.html