The debug console can help you resolve webpage errors. If it’s turned on, the console appears automatically when a webpage error occurs.
Choose Safari > Developer, and turn Debug Console on or off.