How to Enable the Hidden ‘Debug’ Menu in macOS Safari for Advanced Web Development

By default, Apple’s Safari browser is designed to be as simple and consumer-friendly as possible. If you are a web developer, you likely already know how to enable the “Develop” menu (by going to Safari Settings > Advanced > Show Develop menu in menu bar). This unlocks the web inspector, console, and network timelines.

However, the Develop menu is only the tip of the iceberg. Deep within Safari’s code, Apple engineers built a secondary, highly secretive Debug menu. This menu contains incredibly powerful, low-level toggles that allow you to spoof rendering engines, intentionally crash GPU processes, bypass media DRM restrictions, and manually manipulate the browser’s raw memory caching system.

Because these tools can completely break the browser if used incorrectly, Apple removed the toggle for the Debug menu from the graphical user interface entirely. To unlock it, you must use a specific Terminal command to modify Safari’s global preferences.

Step 1: Close Safari

You cannot modify the preference files of an application while it is actively running. If Safari is open, right-click its icon in the dock and select Quit.

Step 2: Execute the Terminal Override

  1. Open the Terminal application (found in Applications > Utilities, or by searching for it via Spotlight).
  2. Copy and paste the following exact command into the Terminal window:
    defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
  3. Press Return.

Step 3: Access the Debug Menu

  1. Relaunch the Safari application.
  2. Look at the very top of your screen at the macOS menu bar.
  3. Directly to the right of the “Help” (or “Develop”) tab, you will see a brand new dropdown menu simply titled Debug.

What Can You Do With It?

The Debug menu contains dozens of highly technical submenus. Here are a few of the most powerful features unlocked for developers:

  • Media Flags: You can explicitly force Safari to use or ignore hardware decoding for specific video codecs (like VP9 or HEVC), which is crucial for testing how your website’s video player performs on older Macs that rely on software decoding.
  • Sync iCloud History: If you are building a cross-platform progressive web app (PWA), you can force a manual, instant sync of your iCloud browsing data between your Mac and iPhone, rather than waiting for Apple’s servers to eventually ping your device.
  • Crash Web Process: You can intentionally simulate a catastrophic memory failure by clicking “Crash Web Process.” This allows you to observe how your website handles a hard reload and state recovery when the browser tab violently crashes.

How to Hide the Debug Menu

If you are finished testing and want to return Safari to its pristine, consumer-friendly state (or if you accidentally broke something in the Debug menu and want to hide the temptation), you can easily reverse the command.

  1. Quit Safari completely.
  2. Open Terminal and run:
    defaults write com.apple.Safari IncludeInternalDebugMenu -bool false
  3. Press Return. The next time you open Safari, the Debug menu will be gone.

RELATED POSTS

  • How to Sign PDF Documents on Mac Using the Preview App
  • How to Create Custom Keyboard Shortcuts for Text Replacement on macOS
  • How to Enable Low Power Mode on a Mac to Save Battery
  • How to Change the IP Address on a Mac
  • How to Take a Screenshot of a Specific Window on a Mac
  • Get the best tech tips delivered straight to your inbox.

    Join thousands of readers mastering Apple, Google, Microsoft, and Linux.