Information in this article applies to Macs running OS X El Capitan (10.11) or earlier. Apple removed the debug option beginning with OS X Sierra (10.12) and moved most of its features to the Develop menu.
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. 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.
Safari Debug Menu in OS X El Capitan and Earlier
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.
Enable Safari's Debug Menu
Close Safari if you have it open and then:
Go to Applications > Utilities and launch Terminal.
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
Press Enter or Return.
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:
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
Press Enter or Return.
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 RepaintShow 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.