Nick Carroll

Metabolising caffeine into code

Javascript debugger for Safari

with 2 comments

My day to day web browser is Firefox, and the best plugin for developing web applications with Firefox has got to be Firebug. Firebug allows you to inspect the CSS style for any element in the page, navigate the DOM, and debug your javascripts. Firebug is tied to Firefox but you can get some basic Firebug functionality for all browsers with Firebug Lite.

What if you want to debug javascript that just doesn’t seem to work for Safari? Well Safari doesn’t have a javascript debugger just yet, but its open source development shapshot WebKit does. To use it you first need to download WebKit. Then go to Safari -> Preferences -> Advanced, and check the checkbox that says “Show Develop menu in menu bar”.

Next time you run WebKit you will have access to the Web Inspector tool located in the Develop menu.

Written by Nick

August 31st, 2008 at 9:10 pm

Posted in Programming

Tagged with

2 Responses to 'Javascript debugger for Safari'

Subscribe to comments with RSS or TrackBack to 'Javascript debugger for Safari'.

  1. WebKit isn’t the opensource equivalent to safari — the WebKit nightlies just launch system Safari with some fiddling to make Safari use the build of the libraries in the nightly bundle, rather than the stable build included in the system. The system webkit is simply a stabilised branch from the main development trunk (see http://trac.webkit.org/browser/branches and http://trac.webkit.org/browser/releases)

    You can avoid any command line fiddling simply by enabling the developer tools in the advanced tab of the Safari preferences. That enables the inspector, which includes a debugger in the nightly builds.

    Oliver

    31 Aug 08 at 9:25 pm

  2. Thanks Oliver, I will edit my post to say that WebKit is the development snapshot of Safari.

    Cheers,
    Nick.

    Nick

    31 Aug 08 at 9:32 pm

Leave a Reply