This is another oldie but goodie from Mac OS X Hints, explaining how to enable the Debug menu in Safari. To do that, quit Safari, open Terminal, paste the following line, and press Return:
defaults write com.apple.Safari IncludeInternalDebugMenu 1
Auto-play videos suck. They use bandwidth, and their annoying sounds get in the way when you’re listening to music and open a web page. …
But you can stop auto-play videos from playing on a Mac. If you use Chrome or Firefox, it’s pretty simple, and the plugins below work both on macOS and Windows; if you use Safari, it’s a bit more complex, but it’s not that hard.
In Safari, they key is the Debug menu, as Kirk points out. Go to Media Flags and select (activate) Disallow Inline Video, and that should be the end of auto-playing video. See Kirk’s blog post for ways to do the same in Firefox and Chrome.
Beyond auto-play video, though, there’s lots to geek out about in the Debug menu…
First up is this, the ultimate geeky overlay:
That’s available via the Show Resource Usage Overlay, and it’s a per-tab overlay—open a new tab, and the overlay statistics apply just to that tab. Most of what’s there probably isn’t of much general use, though it’s interesting to see CPU usage on a per-tab basis—try it on a site with auto-playing video, and you’ll see one reason why such things are universally hated. You can drag the overlay around, but it can’t be positioned outside the window area.
There are some other potentially-interesting looking settings in the Debug menu, including the first two, which let you disable or cap the per-tab processes that Safari uses. (By default, each new tab in Safari is a new process.)
You can also reset or recompute the Top Sites page, which may be useful if you use that page; I don’t. You can crash—or perhaps more usefully, pause—a web process (i.e. a tab doing something). You can even load a blank tab on a five-second delay.
There’s a lot here you won’t care about, too, or that when set, may cause issues rendering pages. And the Start Stress Test menu item appears to be strictly for use within Apple, based on the error message it displays when selected:
As with all things not enabled by default, be careful when playing around with the Debug menu. I suggest changing only one thing at a time if you’re going to experiment, so you can easily revert.