Terminal Tip: Enable Safari web inspector

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!
Share
Categories
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
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.
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
The Advanced preference setting works on Safari for PC, too. Nice.
December 11 2008 at 6:50 PM Report abuse Permalink rate up rate down ReplyFolks, 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.
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.
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.
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 Permalink rate up rate down ReplyI 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.
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 Permalink rate up rate down ReplyThe "Show Develop menu in menu bar" option has been there since Safari 3.0.
December 11 2008 at 1:10 PM Report abuse Permalink rate up rate down ReplyThere 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 Permalink rate up rate down ReplyThanks, that's a way better tip.
December 11 2008 at 1:11 PM Report abuse Permalink rate up rate down ReplySrsly TUAW, its in the preferences...
December 11 2008 at 1:33 PM Report abuse Permalink rate up rate down ReplyHot Apps on TUAW
Deals of the Day
more deals- Altec Lansing Octiv Duo iDock for $48 + free shipping
- Used Apple iMac 17" Core Duo 1.83GHz for $430 + $28 s&h
- Lounge Deluxe Stand for iPhone / iPod touch for $28 + $8 s&h
- Brookstone Surround-Sound Earbuds for $14 + $7 s&h
- Refurbished Skullcandy Tokidoki Smokin' Buds Mic'd Headset for $5 + $2 s&h
- Stitchway Backup Battery for iPod / iPhone for $5 + free shipping
Software Updates
more updates- EFI Firmware Update brings Lion Internet Recovery to 2010-model Macs
- OS X Lion 10.7.3 released with Safari 5.1.3, Wi-Fi bug fix
- Aperture updated to 3.2.2, addresses Photo Stream issue
- Apple updates Keynote to address Lion issues
- Google Search app gets new look on iPad
- Apple releases Apple TV Software Update 4.4.3



13 Comments