O'Reilly logo

Three.js Essentials by Jos Dirksen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Debugging the examples in this book

While creating JavaScript applications, it's important to understand what happens when your application runs in the browser. In the past, we used to use pop-up alerts for this, but luckily, modern browsers (especially Firefox and Chrome) come with good development tools. In this section, we'll quickly show two approaches that you can use to get a better understanding of what happens inside your code when you run the application in a browser. First, we'll look at how to log in to the browser's console log, and after that, we'll quickly show how you can use breakpoints (in Chrome, for this example) to see and explore the current state of your web application.

Using console logging for debugging

Logging from JavaScript ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required