Debugging
It is not necessary to emphasize on the importance of debugging for developers. It is an everyday thing that we do to understand code, identify bugs, and verify that code works fine. At novice level, we use print
statements to debug applications. In JavaScript, we have used the alert
statements, which are deadly if missed. Then, there were the console.log
statements that silently log the parameters to the browser console. We can also use the console.log
statements in Node.js code. It logs the output to the server console, which is the terminal. Non-novice developers have a different level of testing because all of these print statements are time-consuming. The iteration it takes to identify and fix a bug is higher. That is why we needed advanced tools that can stop the code execution at the interested line of code and give us the ability to inspect the variable at the given context. The best example would be Chrome developer tools.
We can put break points in the code and stop the...