defaults write com.apple.Safari IncludeDebugMenu 1
To display the debug menu in Safari 3.0 for Windows, use a text editor to add the following to the Preferences.plist file located at C:\Documents and Settings\USERNAME\Application Data\Apple Computer\Safari\Preferences.plist :
Safari 1.3 and above supports explicit logging of arbitrary information - similar to Objective-C NSLog() - function by using
window.console.log("I think therefore I code!");
alert("I think therefore I code!");
Happy Programming !!