This is a presentation about debuggign and different techniques that are used for debugging code. This presenation include debugging techniques like brute force, backtracking, cause elimination and program slicing.
Debugging is the process of identifying and fixing errors in a computer program. These errors, also known as bugs, can cause a program to crash, malfunction, or produce incorrect results.
Debugging is an essential skill for software engineers, as it helps to ensure that their code is reliable and functions as intended.
2. DEBUGGING IS TWICE AS HARD
AS WRITING THE CODE IN THE
FIRST PLACE Brian Kernighan
3. WHAT IS DEBUGGING:
Debugging is the process of identifying and fixing
errors in a computer program. These errors, also
known as bugs, can cause a program to crash,
malfunction, or produce incorrect results.
Debugging is an essential skill for software
engineers, as it helps to ensure that their code is
reliable and functions as intended.
4. WHY WE DEBUG:
If a program contains errors, or bugs, it can crash,
malfunction, or produce incorrect results, which can be
frustrating for users and can damage the reputation of the
software.
Debugging also helps to identify and fix security
vulnerabilities in a program. These vulnerabilities can be
exploited by malicious actors to gain unauthorized access to
sensitive data or systems.
6. BRUTE FORCE METHOD:
This is the foremost common technique of
debugging
The program is loaded with print statements to
print the intermediate values with the hope that a
number of the written values can facilitate to spot
the statement in error.
7. BACKTRACKING:
This is additionally a reasonably common approach.
during this approach, starting from the statement at
which an error symptom has been discovered, the
source code is derived backward till the error is
discovered. sadly, because the variety of supply
lines to be derived back will increase, the quantity of
potential backward methods will increase and should
become unimaginably large so limiting the utilization
of this approach.
8. CAUSE ELIMINATION METHOD:
In this approach, a listing of causes that may
presumably have contributed to the error symptom is
developed and tests are conducted to eliminate
every error. A connected technique of identification
of the error from the error symptom is that the
package fault tree analysis.
9. PROGRAM SLICING:
In this technique the program is divided into smaller
parts. This slicing of the program is done so that it
can be easily debugged.