Skip to Content

Terminal Tip: Enable Safari web inspector


Perhaps you are a web developer, or maybe you're just nosy. Either way, looking at certain websites' CSS, HTML, and Script documents can be fun. If you are a Safari user, you can easily look at the loading documents in the Activity View (Window > Activity), but what if you want to take this a step further? You can with the Safari Web Inspector, and you can do it by enabling the Safari "Develop" menu.

To enable the Safari Develop menu, just close Safari and type (or copy/paste) the following command into Terminal.app (/Applications/Utilities):

defaults write com.apple.Safari WebKitDeveloperExtras -bool true

Once you enter the command, you will be able to launch Safari, load a webpage, and click Develop > "Show Web Inspector" to see the page attributes. You will be able to see the documents, stylesheets, images, and scripts.

Update: As of new versions of Safari, you can enable the Develop menu by going to Safari > Preferences > Advanced, and click on the "Show Develop menu in menu bar." Thanks to everyone in the comments for pointing this out!

Want more tips and tricks like this? Visit TUAW's Terminal Tips section today!

Categories

Terminal Tips

Perhaps you are a web developer, or maybe you're just nosy. Either way, looking at certain websites' CSS, HTML, and Script documents can...
 

Add a Comment

*0 / 3000 Character Maximum

13 Comments

Filter by:
Brian Cassidy

Not sure how 3 clicks is any easier than typing one line in terminal, but whatever. Nobody ever said you could ONLY do this via Terminal. Perhaps they just needed to feature something in their Terminal Tips sections.

Dang, give it a rest.

December 13 2008 at 11:50 AM Report abuse rate up rate down Reply
1 reply to Brian Cassidy's comment
now4real954

i 2nd that notion...

god people...all you do lately is attack the writers of these posts on TUAW...WTF...

i think there are many many many bitter souls out there...that they didnt get picked to be a columnist...

WHY SO BITTER?

give it a rest...and be nice to the writers...maybe that is why we lost so many writers recently...

STOP BEING SO CRITICAL
THEY ARE ONLY HUMANS

December 15 2008 at 4:06 PM Report abuse rate up rate down Reply
dirtboy

The Advanced preference setting works on Safari for PC, too. Nice.

December 11 2008 at 6:50 PM Report abuse rate up rate down Reply
Rafe H.

Folks, take it easy! Keep in mind that the TUAW bloggers are Windows users by day, and have even resorted to posting Windows how-tos (enable SSH tunnels? love Outlook's 3-pane? hit F5 to refresh?).

So please give 'em a break.

December 11 2008 at 3:24 PM Report abuse rate up rate down Reply
maarten.vancoile

I know this has already been said more than a few times in the comments, but seriously? This has been a preference setting since Leopard came out, and the WebKit nightlies offer a way more powerful inspector.

December 11 2008 at 2:47 PM Report abuse rate up rate down Reply
LuminousNerd.com

You don't need a terminal hack for this. There's a checkbox in the preferences, under advanced.

It's a shame it's so well hidden, Web Inspector is fantastic.

December 11 2008 at 2:04 PM Report abuse rate up rate down Reply
freshyill

For what it's worth, the Webkit nightlies have a *much* more useful Web inspector. I use the inspector for work constantly, and I'm willing to trade a little bit of stability for the usefulness of the new inspector.

December 11 2008 at 2:03 PM Report abuse rate up rate down Reply
1 reply to freshyill's comment
andrew harrison

I think the Safari 4 Developer Preview uses the same inspector as the recent WebKit nightlies. I agree, the inspector is MUCH improved upon. The Developer Preview is too unstable to use every day, but maybe I will check out the WebKit nightlies instead.

December 11 2008 at 5:48 PM Report abuse rate up rate down Reply
Tony

You would think they would know this, since we're more than a year past the release of 3.0

December 11 2008 at 1:52 PM Report abuse rate up rate down Reply
Mike

The "Show Develop menu in menu bar" option has been there since Safari 3.0.

December 11 2008 at 1:10 PM Report abuse rate up rate down Reply
Bill

There is an easier way in Safari 3.2.1. In the File menu, select Preferences. On the Advanced tab, just check the 'Show Develop menu in menu bar' option.

December 11 2008 at 1:06 PM Report abuse rate up rate down Reply
2 replies to Bill's comment
matthew

Thanks, that's a way better tip.

December 11 2008 at 1:11 PM Report abuse rate up rate down Reply
Mooner

Srsly TUAW, its in the preferences...

December 11 2008 at 1:33 PM Report abuse rate up rate down Reply
Buy an ad here

Hot Apps on TUAW

Tweets

© 2012 AOL Inc. All Rights Reserved.