Quite often when browsing the Web, you might find yourself with multiple browser windows and tabs open. This may be convenient for workflow, but if a problem occurs where Safari stalls or otherwise runs slow, or causes your Mac to use excessive CPU percentage and run hot, then while you might be tempted to simply force-quit Safari and relaunch it, you might also benefit from knowing which Safari process is causing the problem.
Safari isolates your various Web pages from each other by hosting them in separate running processes called “Safari Web Content,” and while you will see these in Activity Monitor, determining which is responsible for a particular window may be a touch difficult. By default, the only determining factor for this is to hover your mouse over each Safari Web Content listing, where you can see the Web pages hosted in it show up as a small yellow tooltip window.
To make this easier, you can use Safari’s hidden Debug menu to append the process ID for that window to the window’s name.
- Enable the Debug menu by running the following command in the OS X Terminal:
defaults write com.apple.Safari IncludeInternalDebugMenu 1
- Re-launch Safari to access the Debug menu
- Go to Debug > Miscellaneous Flags, and select “Show Web Process IDs in Page Titles”

Select this option in the Debug menu to show Web Process IDs for each Safari window.
When done, this should make the process ID show wherever the page title is displayed. In some versions of Safari this will be at the top of the window, but in other versions Apple has done away with this in an effort to maximize real estate for Web content. However, you can still determine the window’s process ID by either right-clicking the Dock icon or choosing the Window menu from within Safari. Either of these should show you the Safari windows (with the foremost one being checked), and allow you to see the Process ID for each window. You can then locate these in Activity Monitor to force-quit or otherwise manage them.
To disable the Debug menu in Safari, you can run the following command in the Terminal, followed by re-launching Safari:
defaults delete com.apple.Safari IncludeInternalDebugMenu
UPDATE: Fixed Terminal command syntax.
Dear Topher:
Among your usually excellent tips I can’t follow this one: where is the Debug menu? I used the defaults command as you suggest, and by using “defaults read …” I can check that the property “IncludeDebugMenu” is present and a has a value of 1 (and I restarted Safari).
I do have the “Develop” menu, but there is no “Miscellaneous Flags” submenu.
Thanks for your manifold & useful advice,
best,
Michael.
Perhaps you typed “develop” instead of “debug.” Or you’re using some other utility to enable the Develop menu – as I do. You can use the freeware app Deeper (http://www.macupdate.com/app/mac/23001/deeper), under the Safari tab, to turn the Develop and Debug menus on and off, among other things, without the necessity of using Terminal. There is a version of Deeper for every iteration of OS X since Tiger – though it’s not yet been certified for Yosemite. Deeper is made by the same reliable developer as Onyx and Maintenance (http://www.titanium.free.fr). Onyx offers the same Safari options plus a great deal more. Maintenance is the easiest to use basic system housekeeping utility, which I recommend to my non-technically inclined friends and clients. I have a paid license for Cocktail, which is my regular maintenance tool.
The following Terminal command works on OS X Mavericks with Safari 7.1 to bring up the ‘Debug’ Menu…
defaults write com.apple.Safari IncludeInternalDebugMenu 1
To turn the Safari ‘Debug’ menu off again use this command in Terminal
defaults write com.apple.Safari IncludeInternalDebugMenu 0
So from the original post from Topher, which provides a very useful Tip for safari, it is just a small change of Terminal command, perhaps Topher was working with an older OS X or Safari Version ??? Just change the Default Key from ‘IncludeDebugMenu’ to ‘IncludeInternalDebugMenu’
As an aside to this post, there is an interesting site here, that helps gives access to a few more interesting ‘Hidden Features’ in OS X… http://www.defaults-write.com
Cheers,
Have Fun!
Mark S.
Yes, thank you Mark, with your suggestion “IncludeInternalDebugMenu” it now works successfully for me.
Thanks & best, Michael.