How do professional developers debug their code?
Two words: dev tools! We’ll tell you ALL about your developer tools in the course and they will be the most vital tool in helping you debug errors in your scripts, styles and layouts. Developers have had to debug their code over and OVER and over, so they will generally know where to look for the problem. That’s all that makes them quicker than you are—experience.
Google Developers also has a great guide to debugging in JavaScript using Chrome.