Main Page

Safari (MacOS X)

Safari (MacOS X)
Macintosh’s Safari browser has perhaps the worst support for JavaScript errors and debugging. By
default, it offers no JavaScript error reporting to the end user. In order to enable error reporting, follow
these steps:
1.
Open a command line shell.
2.
Execute the following:
defaults write com.apple.Safari IncludeDebugMenu 1
.
3.
Restart Safari.
4.
Under the Debug menu, check Log JavaScript Exceptions (Figure 14-6).
5.
Start Console.app under Application/Utilities.
Figure 14-6
After completing these steps, JavaScript errors are logged to the Console.app window (Figure 14-7).
Unfortunately, the messages are less than useful without a URL or line number to help locate the cause
of any given error. However, it is the best Safari can offer at this point.
417
Error Handling
17_579088 ch14.qxd 3/28/05 11:41 AM Page 417


JavaScript EditorFree JavaScript Editor     Ajax Editor


©