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:
Open a command line shell.
Execute the following:
defaults write IncludeDebugMenu 1
Restart Safari.
Under the Debug menu, check Log JavaScript Exceptions (Figure 14-6).
Start under Application/Utilities.
Figure 14-6
After completing these steps, JavaScript errors are logged to the 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.
Error Handling
17_579088 ch14.qxd 3/28/05 11:41 AM Page 417

JavaScript EditorFree JavaScript Editor     Ajax Editor