Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

In previous versions of Safari the JavaScript console in the Developer Tools (aka Web Inspector) had a little 'clear' button at the bottom that emptied out console items, which was useful for getting rid of clutter between debug sessions.

As of Safari 6, the new Dev Tools don't seem to have such a button. Manually using clear() and console.clear() doesn't work either. The 'Clear Console' item in the contextual menu doesn't seem to do anything for me.

Short of console.log("\n\n\n\n\n\n\n\n\n"), is there a way to clear the console in Safari 6?

share|improve this question
add comment

1 Answer 1

up vote 15 down vote accepted

Use Command-K (+K) to clear Safari 6 Web Inspector console.

share|improve this answer
1  
That's awesome! Thanks so much, this has been driving me nuts. Undocumented shortcuts FTW :P –  Nathan Greenstein Jul 27 '12 at 15:38
1  
The command-K thing was working for me for a little while, then it stopped. Seems like Safari 6 is pretty inconsistent. –  user31170 Oct 2 '12 at 23:42
    
It looks like the shortcut only works when the console (not the prompt) has focus. Although it doesn't seem documented, it's at least consistent with Terminal.app. :) –  jmk Oct 3 '12 at 0:51
1  
you really saved my nerves ;) –  lupatus Jan 19 '13 at 23:56
2  
undocumented, where as clear() is documented and doesn't work! –  vol7ron Jan 22 '13 at 4:58
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.