课程: Learning JavaScript Debugging

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Explore other breakpoint options

Explore other breakpoint options

- [Instructor] breakpoints that pause execution are really useful by themselves, but we do have some other options for how we can stop and look around under different conditions. Let's take a look at some of those. Here's a fresh example that looks just like the ones we've seen before, but it's a little different, and has a small bug. Let's take a look at what that bug is. I'm going to open this colorbox, and now take a look at what's happening when I swipe in either direction with this image counter. So if I swipe left, I'm moving forward through the images, which is what I would expect, but then if I swipe right, I'm still moving forward through the images. So, we're not quite doing the right thing here, and we're gonna fix it. So I'm gonna open up my developer tools with command + option + I. And here in the sources pane, I'm going to open the index.html file where my JavaScript is, and scroll all the way down. So here's our new implementation. Instead of using swipe left and swipe…

内容