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

Find Safari's hidden menu

What to Know

  • Enable debug menu by inputting defaults write com.apple.Safari IncludeInternalDebugMenu 1 into Terminal.
  • Disable debug menu by inputting defaults write com.apple.Safari IncludeInternalDebugMenu 0 into Terminal.
  • Relaunch Safari after turning the debug menu on or off.

Safari long had a hidden Debug menu that contained 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. Information in this article applies to Macs running OS X El Capitan (10.11) or earlier.

Safari Debug Menu in OS X El Capitan and Earlier

With the release of Safari 4 in the summer of 2008, many useful menu items in the Debug menu were moved to the new Develop menu. However, the hidden Debug menu remained and even picked up a command or two as Safari development continued. It was removed completely from OS X Sierra and later releases of the operating system.

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, was a bit more complicated.

Enabling the Safari debug window requires the use of Terminal, a powerful tool for accessing hidden features of the Mac operating system and its many apps. Terminal is the secret to turning on Safari’s Debug menu.

Safari Debug menu

Enable Safari's Debug Menu

Close Safari if you have it open and then:

  1. Go to Applications > Utilities and launch Terminal.

  2. Enter the following command line into Terminal by typing it or using copy and paste. Enter the command as a single line in Terminal, even though your browser may break it into multiple lines.

    defaults write com.apple.Safari IncludeInternalDebugMenu 1
  3. Press Enter or Return.

  4. Relaunch Safari. The new Debug menu is available.

Disable Safari’s Debug Menu

If you want to disable the Debug menu, you can do so at any time, again using Terminal. Close Safari if it is open and then:

  1. Launch Terminal.

  2. Enter the following command line into Terminal by typing it or using copy and paste. Enter the command as a single line in Terminal, even though your browser may break it into multiple lines.

    defaults write com.apple.Safari IncludeInternalDebugMenu 0
  3. Press Enter or Return.

  4. Relaunch Safari. The Debug menu is gone.

Favorite Safari Debug Menu Items

With the Debug menu under your control, you can try out various menu items. Not all of the menu items are usable because many are designed to be used in a development environment where you have control over the web server. Nevertheless, useful items include:

  • Force Repaint
  • Show Frame Rate Meter, which displays CPU load, page frame rate speed, and updates being made to the page, all in the form of analog speedometers.
  • Various flag options.
  • Sync iCloud History.
  • Depending on the version of Safari, the option to reset and recompute Top Sites.
Was this page helpful?