Where is the console API for WebKit/Safari?

Solution 1:

Supported methods were originally:

  • console.log()
  • console.error()
  • console.warn()
  • console.info()

Newer versions of WebKit also add the following methods making the WebKit console API almost identical to Firebug's console API:

  • console.count()
  • console.debug()
  • console.profileEnd()
  • console.trace()
  • console.dir()
  • console.dirxml()
  • console.assert()
  • console.time()
  • console.profile()
  • console.timeEnd()
  • console.group()
  • console.groupEnd()

(New information based on the WebKit nightly build WebKit-SVN-r37126, at the time of writing these methods aren't available in Safari)

Solution 2:

The console API is documented by Apple in the Console section of the Safari Developer Guide.

Solution 3:

I know this is an old and answered question, but you can also just open the console and type console.__proto__, and you'll get an expandable list of everything it supports.

Solution 4:

Firebug's Console API documentation has moved here:

http://getfirebug.com/wiki/index.php/Console_API