Safari’s Debug Menu

By | | Open Source

4

For web developers on Mac OS X, there is a wonderful and powerful hidden tool in Safari that in part functions like the Firefox extension Web Developer. Though it does not have quite the same depth as Chris Pederick’s tool.

The Safari Debug menu can be activated with a simple command in OS X’s Terminal (/Applications/Utilities/Terminal.app). At the initial shell prompt typing ‘defaults write com.apple.Safari IncludeDebugMenu 1′ (with Safari closed) will add one additional menu item upon its next launch. By changing the 1 to a 0 the Debug menu can be turned back off.

The extra menu has several nice tools, most straightforward but still largely undocumented. These include a page load tester similar to what ab can do for performance testing Apache (could possibly be leveraging it), access to viewing a document’s architecture (tree views), User-Agent masquerading and JavaScript debugging.

There are more handy tidbits – for instance opening the same page in multiple other browsers installed on your Mac for preview tests via a single click within Safari, and some limited SSL debugging.

Finally – a nice little bookmark importer for Mozilla, IE and Netscape (sorely missing in Safari without the Debug menu on!) and the capability to export Safari bookmarks rounds it out on the convenience scale.

Written By:

Blane Warrene

Blane is a writer and researcher focusing on Apple and Open Source technologies. Prior to this, he helped found a commercial software and consulting venture, and worked in the financial services sector as a director of technology and in varying technical roles. Blane maintains Open Sourcery: SitePoint's Open Source Blog.

Website
>> More Posts By Blane Warrene

 

{ 4 comments }

WebMediaChic April 15, 2005 at 2:02 pm

Anyone know of a reason why the reporting from the Page Load Test Window (in the Debug menu) would not agree with the Activity Window?

Page Load Test Window shows over 5MB, while the sum of the files in the activity window is much much much smaller.

We do run ads from multiple ad servers (different domains). Anyone know if the activity window would miss some of this?

Thanks!

nate March 18, 2005 at 1:53 pm

another useful feature in the debug menu is the ability to “fake” using another browser – for example, Safari can tell a website that it is IE6 on windows. I’ve found that many of the websites that don’t work with a non-IE browser miraculously begin working just because they THINK you’re using Internet Explorer…

mmj March 17, 2005 at 5:44 am

I’m amazed that something so useful would be hidden.

cloak March 17, 2005 at 5:01 am

wow, this is excellent. Ive been dying to find an easy way to get my bookmarks imported into safari. Thanks very much.

Comments on this entry are closed.