Safari: Develop menu → Show Error Console (Ctrl+Alt+C or Alt+⌘ Cmd+C). You might have to enable the Develop menu first in Preferences → Advanced. For OSX, use ⌥ Option+⌘ Command+I then hit esc (escape) to open the JavaScript console. Errors will appear in red.