Chapter 10. Debugging
Every developer has been there: staring at the screen, wondering why something that should work perfectly fine is acting up, and feeling like the computer is personally mocking their efforts. This is where debugging comes in.
Debugging is one of those skills that separates good developers from great ones. It’s not just about finding bugs—it’s about understanding your code, your tools, and the intricate dance among browsers, servers, and user interactions. All of the previous chapters provided you with the base knowledge of everything related to web development. Now, we make use of this knowledge to figure out when something is going wrong. For our support, there are great development tools and methodologies available.
This chapter will walk you through the essential DevTools panels that should become second nature and, more importantly, the debugging techniques that will help you approach any problem with confidence instead of panicking.
Since all theory needs to prove itself in practice, we’ll examine two real-world scenarios from my own experience that showcase not only outrageous and head-scratching bugs but also how the right debugging technique made all the difference in solving them.
Browser Developer Tools
In general, Chrome’s DevTools are regarded as the best in their class. They are the same in all Chromium-based browsers, and they not only include a plethora of features but also are easily extensible with specific Chrome extensions. Especially ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access