Whenever I see someone really effectively debug JavaScript in the browser, they use the DevTools tooling to do it. Setting breakpoints and hopping over them and such. That, as opposed to sprinkling console.log() (and friends) statements all around your code….
Source: https://css-tricks.com/how-to-stop-using-console-log-and-start-using-your-browsers-debugger/