Yesterday I needed to debug some Javascript in Safari 3.1 on Windows.
In version 3.0 you had to edit a preferences file to enable the “Debug” menu (that preferences file is no longer there in 3.1). In 3.1 there is no longer a “Debug” menu there is now a “Develop” menu that is enabled via preferences. If you want to enable the menu go to the “Edit” menu -> “Preferences…” —> “Advanced” preferences and the option is at the bottom of that preferences pane. Now you should see the “Develop” menu to access the various development and debugging tools.