

Make sure that this points at wherever your source code is (or source maps). A typical launch.json for Chrome debugging will look something like this vscode/launch.json file in your project home. To get started download and install the Debugger for Chrome VS Code extension This includes setting break points and stepping in and out of sections of code. If you are using VS Code there is a great debugger tool that hooks in with Chrome to facilate real-time debugging of your code. In some cases this can even have a performance impact on the production build Let's face it - we have all had / seen this happen. You run the risk of including the logging in a production build.

Descriptive logging helps but as we will see it is not worth the overhead when better options are available. Once you have started putting in a number lines of logging you have to remember where they correspond to in the code. There can end up being so much output that it becomes essentially useless It can be difficult to manage when the debug is inside a loop or a timed event (eg setInterval or requestAnimationFrame).While there is nothing necessarily wrong with debugging by way printing console.out all over the place it does have its short comings.
