The console
The console is one of the most important tools for developers. You can use it to check the state of our application while it is in use.
You can locate the JavaScript code and set breakpoints to check what is happening at a particular point. You can do this by locating the JavaScript file in the Sources tab. Just click the line you want to stop at. Then you can check the value of the variables and run the code step by step. Also, you can write the word debugger
in the code to stop the program at this place.
If you navigate to the
Console tab you will see the console itself. There, you can show information using the console.log
function or check the console object documentation to see the best method you can use at each moment (https://developer.mozilla.org/en-US/docs/Web/API/Console).
If you write the word window
in the console, you will see all the objects that are in the global scope.