



The Develop menu will appear and you’ll be able to access the Show Error Console menu item. At the bottom of the pane, check the box next to “Show Develop Menu in menu bar”: Open Safari > Preferences, and click on the Advanced Tab. If you don’t see the Develop menu, you’ll need to turn it on using Safari Preferences. To access the developer console in Safari, use the Develop > Show Error Console menu item (Option-Cmd-C): This will not close your browser window, just the console. To close the console window, use the X in the top left corner of the console. If you don’t see the Console tab on the right:Īnd you need to get back to the Console from another tab, you can use the little popup menu under the two little right arrows (>) on the right side of the tab bar: You can change the size of the console by placing your mouse over the line above the tabs (you’ll see the mouse cursor change to the sizing cursor), and moving the top of the console up or down. It’s also where you’ll see errors, if your program has any, so it’s a good idea to open the console when you’re working on a program so you can see any errors that pop up. This is where you’ll see any messages you pass to console.log in your JavaScript programs. If you don’t see “Howdy partner”, just reload the page. The Console will open at the bottom of your browser window, and you should see the message “Howdy partner” displayed: To access the developer console in Chrome, first load the howdy.html file into your browser, and then use the View > Developer > JavaScript Console menu (Option-Cmd-J):
TEST SAFARI FOR MAC ON WINDOWS HOW TO
Head First JavaScript Programming: Experimenting with JavaScript in the Console: How to use the JavaScript console to experiment with and test your JavaScript code. Using the Console: Two videos about using the Safari and Chrome consoles. Once you’ve got the basics down of how to access the developer console in your browser, check out the video I created that shows you more about how to use the console: Head First JavaScript Programming: Experimenting with JavaScript in the Console. I’ll show you Chrome, Safari and Firefox on the Mac and Chrome, Firefox and IE on Windows. I’ll first cover browsers on the Mac, and after that, browsers on Windows.
TEST SAFARI FOR MAC ON WINDOWS CODE
You can download all the code from github, or type the example in from the book. To show you how to access the console in each browser, I’m using an example from Chapter 1, in the file howdy.html. So be prepared to experiment a little if your console doesn’t look exactly like the examples below (although we’ll do our best to keep this information up to date with the most recent version of each browser). For instance, Safari version 6.1 has a very different looking console from Safari version 6. Not only that, but the browsers change the implementation of the console occasionally. With every browser, you’ll use a slightly different way of accessing and using the developer console. If you’re reading Head First JavaScript Programming or Head First HTML5 Programming, this is where you’ll find instructions on how to use the console in modern browsers to examine your console.log output and check for errors, like we show you in the examples in the book.
