Debugging
What is Debugging?
-
In computer programming and software development, debugging is the process of finding and resolving bugs (defects or problems that prevent correct operation) within computer programs, software, or systems.
-
Debugging is the process of finding errors. It involves a process of deduction.
Execution contexts
- Execution contexts: Roughly equates to the ‘environment’ a function executes in; that is, variable scope (and the scope chain, variables in closures from outer scopes), function arguments, and the value of the this object.
Types Of Errors:

HOW TO DEAL WITH ERRORS
-
1: DEBUG THE SCRIPT TO FIX ERRORS If you come across an error while writing a script (or when someone reports a bug), you will need to debug the code, track down the source of the error, and fix it.
-
2: HANDLE ERRORS GRACEFULLY You can handle errors gracefully using try, catch, throw, and f i na 1 ly statements.
CONSOLE
-
The JavaScript console will tell you when there is a problem with a script, where to look for the problem, and what kind of issue it seems to be.
-
The JavaScript console is just one of several developer tools that are found in all modern browsers.