How to Enable Safari's Debug Menu to Gain Added Capabilities

Find Safari's Hidden Menu

Safari Debug menu
Use Terminal to enable Safari's debug menu. Screen shot courtesy of Coyote Moon, Inc.

Safari has long had a hidden Debug menu that contains some very useful capabilities. Originally intended to assist developers in debugging web pages and the JavaScript code that runs on them, the debug menu was hidden away because the commands that were included in the menu could wreak havoc on web pages.

With the release of Safari 4 in the summer of 2008, many of the most useful menu items in the Debug menu were moved to the new Develop menu.

But the hidden Debug menu remained, and even picked up a command or two as Safari development continued.

Apple made accessing the hidden Develop menu an easy process, only requiring a trip to the Safari's preferences. Accessing the Debug menu, on the other hand, is a bit more complicated.

Enabling the Safari debug window requires the use of Terminal, one of our favorite tools for accessing hidden features of OS X and its many apps. Terminal is pretty powerful; it can even make your Mac start singing, but that’s a bit of an unusual use for the app. In this case, we're going to use Terminal to modify Safari’s preference list to turn the Debug menu on.

Enable Safari's Debug Menu

  1. Launch Terminal, located at /Applications/Utilities/Terminal.
  2. Enter the following command line into Terminal. You can copy/paste the text into Terminal (tip: triple-click in the line of text below to select the entire command), or you can simply type the text as shown. The command is a single line of text, but your browser may break it into multiple lines. Be sure to enter the command as a single line in Terminal.
  1. defaults write com.apple.Safari IncludeInternalDebugMenu 1
  2. Press enter or return.
  3. Relaunch Safari. The new Debug menu will be available.

Disable Safari’s Debug Menu

If for some reason you want to disable the Debug menu, you can do so at any time, again using Terminal.

  1. Launch Terminal, located at /Applications/Utilities/Terminal.
  1. Enter the following command line into Terminal. You can copy/paste the text into Terminal (don’t forget to use the triple-click tip), or you can simply type the text as shown. The command is a single line of text, but your browser may break it into multiple lines. Be sure to enter the command as a single line in Terminal.
  2. defaults write com.apple.Safari IncludeInternalDebugMenu 0
  3. Press enter or return.
  4. Relaunch Safari. The Debug menu will be gone.

Favorite Safari Debug Menu Items

Now that the Debug menu is under your control, you can try out various menu items. Not all of the menu items are usable since many are designed to be used in a development environment where you have control over the web server. Nevertheless, there are some useful items here, including:

  • Force Repaint
  • Show Frame Rate Meter, which will display CPU load, page frame rate speed, and updates being made to the page, all in the form of analog speedometers.
  • The various flag options.
  • Sync iCloud History.
  • And, depending on the version of Safari you're using, the option to reset and recompute Top Sites.

References

Defaults

Published: 7/3/2009

Updated: 12/28/2015

Was this page helpful?