A co-worker recently brought to my attention that I always reach for
console.log when I’m trying to figure out why some code is not behaving as I expect. It’s rather like always reaching for a hammer and ignoring the screwdrivers and wrenches. Sometimes a hammer is the right tool. Sometimes it’s not. Ultimately, scattering
console.log around your code like fairy dust is not a particularly effective debugging method.
These are some things I’m reading to branch out and get comfortable with more debugging tools and techniques:
- /dev tips
- How to stop using console.log() and start using your browser’s debugger
- CSS Debugging and Optimization: Browser-based Developer Tools
- Art of debugging with Chrome DevTools
- Tips and Tricks for Debugging in Chrome Developer Tools
- Conditional Breakpoints in Chrome are Awesome
I hope these links are helpful to others looking to improve their debugging processes!