Chapter 22Debugging

Unfortunately, bugs are a part of life when writing software, no matter what language you’re working with. Debugging, as the name suggests, is the process of tracking down bugs and fixing them. The process of debugging can be as simple as adding console.log() calls to your code to verify that certain variables hold expected values. But for more involved bugs, you’ll want to use a debugger. Debuggers are extremely successful at tracking down bugs, as they allow you to step through an application line by line, inspecting (and modifying) variable values.

This chapter will teach you how to debug JavaScript applications using Google Chrome’s DevTools. All modern browsers have similar debugging facilities, but we’ve chosen to focus ...

Get Full Stack JavaScript Development With MEAN now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.