From the course: Learning JavaScript Debugging

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Challenge: Knowing when to stop

Challenge: Knowing when to stop - JavaScript Tutorial

From the course: Learning JavaScript Debugging

Start my 1-month free trial

Challenge: Knowing when to stop

(electronic music) - [Instructor] Here is our first challenge on using breakpoints. We're going to look at a page that has a couple of problems and use what we know about breakpoints to help diagnose what's wrong. Let's start by looking at the page and how to trigger those problems. This is a slightly enhanced version of the Hansel and Petal page that we've been looking at previously, but it has a couple of problems. First, we have a checkout panel over here that slides out when you click the checkout button. If I click that close button, it closes. That all works as we expect, but if I open it again and click this close this panel button, nothing happens. I'm expecting that both of them will work and they should both work using a single handler function. If I open up the developer tools, the code for that is down here at the bottom of the file in one of these script tags. Now, here we go. Here's my checkout…

Contents