Is there any way to log to Safari's JavaScript console when running with the built-in JavaScript debugger? I've read the Firefox JavaScript logging question and hoping that there is a simple ("native") way to do it in WebKit/Safari.
Thanks
Is there any way to log to Safari's JavaScript console when running with the built-in JavaScript debugger? I've read the Firefox JavaScript logging question and hoping that there is a simple ("native") way to do it in WebKit/Safari.
Thanks
It works just the same in Safari as it does in Chrome and Firefox. By default the developer tools is not turned on, so make sure you go to Preferences -> Advanced -> Show Develop Menu in Menu Bar
. Then you can pull up the console with Command+Option+C. (That shortcut obviously assumes Mac, not sure the PC shortcut, but it's in the dropdown as well)
You can use the same console
object described in that question. The messages will show up in the console tab.
console.log("hello console");
console.log
will work "natively" in Firefox (with Firebug), IE8+, and WebKit browsers (including Safari).