JavaScript debugging
If you are not a completely new programmer, I am sure you must have spent some amount of time debugging your or someone else's code. Debugging is almost like an art form. Every language has different methods and challenges around the debugging. JavaScript is traditionally a difficult language to debug. I have spent days and nights in misery, trying to debug badly written JavaScript code using alert()
functions. Fortunately, modern browsers, such as Mozilla, Firefox, and Google Chrome, have excellent Developer Tools to help debug JavaScript in the browser. There are IDEs like IntelliJ IDEA and WebStorm with great debugging support for JavaScript and Node.js. In this chapter, we will focus primarily on Google Chrome's built-in developer tool. Firefox also supports Firebug extension and has excellent built-in developer tools, but as they behave more or less the same as Google Chrome's Developer Tools, we will discuss common debugging approaches that work...