Error Reporting and JavaScript

I’ve just started learning a little JavaScript. When I make an error in my code all I see is a blank page in my browser.

Is there any way to turn on error reporting, so that I can see where my coding errors are?


Just open the error console - that’s where the error messages get displayed. See for instructions on where to find it in various different browsers.

To add to what felgal says, I wrote a short blog post about this - maybe it helps: Simple JavaScript debugging with Chrome’s console

Edit: A more advanced video tutorial:!

Nice tutorial with a clear explanation of how the console works.

The one thing you left out in the mention of alert() as a not so good alternative is that Chrome, Safari and Firefox will display a checkbox on the second and subsequent times the alert appears so that you can skip the rest of the alerts and Opera displays an extra checkbox every time allowing you to turn off JavaScript for the page. So if you figure out the problem on the first or second alert you can skip the rest. Not as convenient as using the console though.

Thank you Stephen, I appreciate that!!

I have updated the tutorial to include your comments.
I also added a link to your homepage by way of a thank you for the feedback.