I promised my next blog post will be positive, so here we go. Few people know this, but while Safari debugging on iOS doesn’t exist, Safari debugging on PC is actually fairly useful. There will be a more elaborate blog post following soon, but this first little goodie will get you going first. Paste this into your Terminal and run it:

defaults write com.apple.Safari IncludeInternalDebugMenu 1

Next time you start WebKit nightly or Safari, you will find a new menu called “Debug” (nope, it’s not the Develop menu.). This is how it currently looks like on Snow Leopard:

To me, the by far most useful features are the “Show Compositing Borders” and “Show Caches Window” options. Compositing borders gives you insight into the different render layers and helps you identify render issues (more on this soon), and the cache window gives you lots of info on memory usage. Finally, please note that there’s a good reason why this is hidden from us in the first place: Much of it is not self-explanatory and some of it will not work at all on your machine. Handle with care!

Enjoy! Thanks goes to Alex Russell, who gave me this very helpful tip around a year ago.