SlideShare a Scribd company logo
2
Most read
3
Most read
7
Most read
The Art of Debugging
Dr. S. Karthigai Selvi
Guest Teacher
Department of Computer Science and Applications
The Gandhigram Rural Institute – Deemed to be University,
India
kkgruugpg@gmail.com
What is debugging?
 Testing process results uncover processes
and errors. Debugging is the process of
removing the errors.
 It reveals the area where the correspondence
between aim and testing result.
 It is a series of process and produces two
outcomes
(1) the cause will be found and corrected or
(2) the cause will not be found.
characteristics of bugs provide
some clues:
1. That is, the symptom may appear in one part
of a program, while the cause may actually
be located at a site that is far removed. Highly
coupled components increase this situation.
2. The symptom may disappear (temporarily)
when another error is corrected.
3. The symptom may actually be caused by non-
errors (e.g., round-off inaccuracies).
4. The symptom may be caused by human error
that is not easily traced.
5. The symptom may be a result of timing
problems, rather than processing problems.
6. It may be difficult to accurately reproduce
input conditions (e.g., a real-time application
in which input ordering is indeterminate).
7. The symptom may be due to causes that are
distributed across a number of tasks running
on different processors.
Psychological Considerations
 Debugging process ability arises based on
experience and interest.
 Somebody feels frustration
 Cannot accept errors
Debugging Strategies
 Debugging is a straightforward application of
the scientific method that has been
developed over 2,500 years
 Based on working hypotheses partition the
software into two or more, then debug the
programs
 Three debugging strategies were proposed
by Mye
 Strategies are
 Brue Force: Isolate errors
by
 memory dumps are taken,
 run-time traces are invoked,
 the program is loaded with
output statements.
 Any one clue is identified in
the above activities and entire
program will be debugged
 It consumes more time
Debugging
Cause
Elimination
Backtracking Brute Force
 Backtracking:
 Most common method for small programs
 The errors are backward traced manually
 Drawback: if no of lines increased the detection
will difficult
 Cause elimination:
 Introduces binary partitioning
 A “cause hypothesis” is
 devised and the aforementioned data are used to
prove or disprove the hypothesis.
 a list of all possible causes is developed and tests
are conducted to eliminate each
Automated debugging
 debugging approaches can be supplemented with
debugging tools that can provide you with semi-automated
support as debugging strategies are attempted.
 Integrated development environments (IDEs) provide a way
to capture some of the language specific predetermined
errors (e.g., missing end-of-statement characters,
undefined variables, and so on) without requiring
compilation.”
 A wide variety of debugging compilers, dynamic debugging
aids (“tracers”), automatic test-case generators, and cross-
reference mapping tools are available. However, tools are
not a substitute for careful evaluation based on a complete
design model and clear source code.
Correcting the Error
 Once a bug has been found, it must be
corrected. Before making the “correction” that
removes the cause of a bug:
 Is the cause of the bug reproduced in another
part of the program?
 a program defect is caused by an erroneous pattern of
logic that may be reproduced elsewhere. Explicit
consideration of the logical pattern mayresult in the
discovery of other errors.
 What “next bug” might be introduced by the fix
I’m about to make?
 What could we have done to prevent this bug
in the first place?
 Before the correction is made, the source code
(or, better, the design) should be evaluated to
assess coupling of logic and data structures. If the
correction is to be made in a highly coupled
section of the program, special care must be
taken when any change is made.
 What could we have done to prevent this bug
in the first place?
 If you correct the process as well as the product,
the bug will be removed from the current program
and may be eliminated from all future programs.
Thank
you

More Related Content

PPTX
Debugging
Jonathan Holloway
 
PPTX
Hamming code system
DILSHAD AHMAD
 
PPT
Software Testing Strategies
NayyabMirTahir
 
PPT
Chapter 13 software testing strategies
SHREEHARI WADAWADAGI
 
PPTX
Incremental process model
Madushan Sandaruwan
 
PPT
1.1 The nature of software.ppt
JAYAPRIYAR7
 
PDF
Types of Threat Actors and Attack Vectors
LearningwithRayYT
 
PPT
Instance Based Learning in Machine Learning
Pavithra Thippanaik
 
Hamming code system
DILSHAD AHMAD
 
Software Testing Strategies
NayyabMirTahir
 
Chapter 13 software testing strategies
SHREEHARI WADAWADAGI
 
Incremental process model
Madushan Sandaruwan
 
1.1 The nature of software.ppt
JAYAPRIYAR7
 
Types of Threat Actors and Attack Vectors
LearningwithRayYT
 
Instance Based Learning in Machine Learning
Pavithra Thippanaik
 

What's hot (20)

PPT
Agile development, software engineering
Rupesh Vaishnav
 
PPTX
Design Concepts in Software Engineering-1.pptx
KarthigaiSelviS3
 
PPT
Formal Specification in Software Engineering SE9
koolkampus
 
PPTX
unit 3 Design 1
TharuniDiddekunta
 
PPT
Capability Maturity Model (CMM) in Software Engineering
FaizanAhmad340414
 
PPT
Software process and project metrics
Indu Sharma Bhardwaj
 
PPTX
Design Concept software engineering
Darshit Metaliya
 
PPTX
Software project planning
rajvir_kaur
 
PPTX
System testing
Sifat Hossain
 
PPTX
Formal Approaches to SQA.pptx
KarthigaiSelviS3
 
PPTX
Advanced Structural Modeling
AMITJain879
 
PPTX
Fundamental design concepts
srijavel
 
PPTX
Cohesion and coupling
Aprajita (Abbey) Singh
 
PPT
Software Engineering (Project Scheduling)
ShudipPal
 
PPTX
Modules and modularization criteria
Umaselvi_R
 
PPTX
object oriented methodologies
Amith Tiwari
 
PPT
Lecture 9 understanding requirements
IIUI
 
PPT
Risk management(software engineering)
Priya Tomar
 
PPTX
Software Engineering
Jignesh Kariya
 
PPTX
Reusibility vs Extensibility in OOAD
Shivani Kapoor
 
Agile development, software engineering
Rupesh Vaishnav
 
Design Concepts in Software Engineering-1.pptx
KarthigaiSelviS3
 
Formal Specification in Software Engineering SE9
koolkampus
 
unit 3 Design 1
TharuniDiddekunta
 
Capability Maturity Model (CMM) in Software Engineering
FaizanAhmad340414
 
Software process and project metrics
Indu Sharma Bhardwaj
 
Design Concept software engineering
Darshit Metaliya
 
Software project planning
rajvir_kaur
 
System testing
Sifat Hossain
 
Formal Approaches to SQA.pptx
KarthigaiSelviS3
 
Advanced Structural Modeling
AMITJain879
 
Fundamental design concepts
srijavel
 
Cohesion and coupling
Aprajita (Abbey) Singh
 
Software Engineering (Project Scheduling)
ShudipPal
 
Modules and modularization criteria
Umaselvi_R
 
object oriented methodologies
Amith Tiwari
 
Lecture 9 understanding requirements
IIUI
 
Risk management(software engineering)
Priya Tomar
 
Software Engineering
Jignesh Kariya
 
Reusibility vs Extensibility in OOAD
Shivani Kapoor
 
Ad

Similar to The Art of Debugging.pptx (20)

PPTX
Software engineering 22 error detection and debugging
Vaibhav Khanna
 
PDF
Debugging.pdf
kumari36
 
PDF
Stm unit1
Chaitanya Kn
 
PDF
bug-advocacy
KALYAN Chakravarthy
 
PDF
Effective Bug Tracking Systems: Theories and Implementation
IOSR Journals
 
PDF
Defect effort prediction models in software
IAEME Publication
 
PDF
Inrotduction of Testing
Palash Ghosh
 
DOCX
Software engg unit 4
Vivek Kumar Sinha
 
PPT
Unit 1, PART 1 Software testing methodologies
RevathiPemmaraju1
 
PPTX
Chapter 1 Fundamental of testing (By Eva Normala)
EvaNormala
 
PDF
EFFECTIVE TEST CASE DESING: A REVIEW
Journal For Research
 
PDF
O0181397100
IOSR Journals
 
PDF
IRJET- Technique of Finding the Defect in Software Testing
IRJET Journal
 
PPTX
Software Testing
Prof .Pragati Khade
 
PPTX
Software Testing overview jay prakash maurya.pptx
JayPrakash779563
 
PDF
Complete Manual Testing Notes which tells about the process of testing
amargvn
 
PPTX
Defect Tracking Software Project Presentation
Shiv Prakash
 
PPTX
sri indu 1213 it
jignash
 
PPTX
Debugging- bajju.pptx
ShivamBajaj36
 
DOC
Lesson 7...Question Part 1
bhushan Nehete
 
Software engineering 22 error detection and debugging
Vaibhav Khanna
 
Debugging.pdf
kumari36
 
Stm unit1
Chaitanya Kn
 
bug-advocacy
KALYAN Chakravarthy
 
Effective Bug Tracking Systems: Theories and Implementation
IOSR Journals
 
Defect effort prediction models in software
IAEME Publication
 
Inrotduction of Testing
Palash Ghosh
 
Software engg unit 4
Vivek Kumar Sinha
 
Unit 1, PART 1 Software testing methodologies
RevathiPemmaraju1
 
Chapter 1 Fundamental of testing (By Eva Normala)
EvaNormala
 
EFFECTIVE TEST CASE DESING: A REVIEW
Journal For Research
 
O0181397100
IOSR Journals
 
IRJET- Technique of Finding the Defect in Software Testing
IRJET Journal
 
Software Testing
Prof .Pragati Khade
 
Software Testing overview jay prakash maurya.pptx
JayPrakash779563
 
Complete Manual Testing Notes which tells about the process of testing
amargvn
 
Defect Tracking Software Project Presentation
Shiv Prakash
 
sri indu 1213 it
jignash
 
Debugging- bajju.pptx
ShivamBajaj36
 
Lesson 7...Question Part 1
bhushan Nehete
 
Ad

More from KarthigaiSelviS3 (7)

PPTX
System Testing.pptx
KarthigaiSelviS3
 
PPTX
Software Testing Strategy - Unit4.pptx
KarthigaiSelviS3
 
PPTX
Statistical Software Quality Assurance.pptx
KarthigaiSelviS3
 
PPTX
SW Project Process.pptx
KarthigaiSelviS3
 
PPTX
Software Quality assurance.pptx
KarthigaiSelviS3
 
PPTX
CropProduction.pptx
KarthigaiSelviS3
 
PPTX
importance of fitness2.pptx
KarthigaiSelviS3
 
System Testing.pptx
KarthigaiSelviS3
 
Software Testing Strategy - Unit4.pptx
KarthigaiSelviS3
 
Statistical Software Quality Assurance.pptx
KarthigaiSelviS3
 
SW Project Process.pptx
KarthigaiSelviS3
 
Software Quality assurance.pptx
KarthigaiSelviS3
 
CropProduction.pptx
KarthigaiSelviS3
 
importance of fitness2.pptx
KarthigaiSelviS3
 

Recently uploaded (20)

PDF
Software Testing Tools - names and explanation
shruti533256
 
DOCX
SAR - EEEfdfdsdasdsdasdasdasdasdasdasdasda.docx
Kanimozhi676285
 
PDF
Chad Ayach - A Versatile Aerospace Professional
Chad Ayach
 
PPTX
easa module 3 funtamental electronics.pptx
tryanothert7
 
PPTX
22PCOAM21 Session 1 Data Management.pptx
Guru Nanak Technical Institutions
 
PPTX
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
PDF
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
PDF
Zero carbon Building Design Guidelines V4
BassemOsman1
 
PPTX
FUNDAMENTALS OF ELECTRIC VEHICLES UNIT-1
MikkiliSuresh
 
PPTX
Chapter_Seven_Construction_Reliability_Elective_III_Msc CM
SubashKumarBhattarai
 
PDF
JUAL EFIX C5 IMU GNSS GEODETIC PERFECT BASE OR ROVER
Budi Minds
 
PPTX
MT Chapter 1.pptx- Magnetic particle testing
ABCAnyBodyCanRelax
 
PPTX
Tunnel Ventilation System in Kanpur Metro
220105053
 
PDF
Zero Carbon Building Performance standard
BassemOsman1
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PDF
2010_Book_EnvironmentalBioengineering (1).pdf
EmilianoRodriguezTll
 
PDF
2025 Laurence Sigler - Advancing Decision Support. Content Management Ecommer...
Francisco Javier Mora Serrano
 
PPTX
Information Retrieval and Extraction - Module 7
premSankar19
 
PDF
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
PDF
dse_final_merit_2025_26 gtgfffffcjjjuuyy
rushabhjain127
 
Software Testing Tools - names and explanation
shruti533256
 
SAR - EEEfdfdsdasdsdasdasdasdasdasdasdasda.docx
Kanimozhi676285
 
Chad Ayach - A Versatile Aerospace Professional
Chad Ayach
 
easa module 3 funtamental electronics.pptx
tryanothert7
 
22PCOAM21 Session 1 Data Management.pptx
Guru Nanak Technical Institutions
 
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
Zero carbon Building Design Guidelines V4
BassemOsman1
 
FUNDAMENTALS OF ELECTRIC VEHICLES UNIT-1
MikkiliSuresh
 
Chapter_Seven_Construction_Reliability_Elective_III_Msc CM
SubashKumarBhattarai
 
JUAL EFIX C5 IMU GNSS GEODETIC PERFECT BASE OR ROVER
Budi Minds
 
MT Chapter 1.pptx- Magnetic particle testing
ABCAnyBodyCanRelax
 
Tunnel Ventilation System in Kanpur Metro
220105053
 
Zero Carbon Building Performance standard
BassemOsman1
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
2010_Book_EnvironmentalBioengineering (1).pdf
EmilianoRodriguezTll
 
2025 Laurence Sigler - Advancing Decision Support. Content Management Ecommer...
Francisco Javier Mora Serrano
 
Information Retrieval and Extraction - Module 7
premSankar19
 
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
dse_final_merit_2025_26 gtgfffffcjjjuuyy
rushabhjain127
 

The Art of Debugging.pptx

  • 1. The Art of Debugging Dr. S. Karthigai Selvi Guest Teacher Department of Computer Science and Applications The Gandhigram Rural Institute – Deemed to be University, India [email protected]
  • 2. What is debugging?  Testing process results uncover processes and errors. Debugging is the process of removing the errors.  It reveals the area where the correspondence between aim and testing result.  It is a series of process and produces two outcomes (1) the cause will be found and corrected or (2) the cause will not be found.
  • 3. characteristics of bugs provide some clues: 1. That is, the symptom may appear in one part of a program, while the cause may actually be located at a site that is far removed. Highly coupled components increase this situation. 2. The symptom may disappear (temporarily) when another error is corrected. 3. The symptom may actually be caused by non- errors (e.g., round-off inaccuracies). 4. The symptom may be caused by human error that is not easily traced.
  • 4. 5. The symptom may be a result of timing problems, rather than processing problems. 6. It may be difficult to accurately reproduce input conditions (e.g., a real-time application in which input ordering is indeterminate). 7. The symptom may be due to causes that are distributed across a number of tasks running on different processors.
  • 5. Psychological Considerations  Debugging process ability arises based on experience and interest.  Somebody feels frustration  Cannot accept errors
  • 6. Debugging Strategies  Debugging is a straightforward application of the scientific method that has been developed over 2,500 years  Based on working hypotheses partition the software into two or more, then debug the programs  Three debugging strategies were proposed by Mye
  • 7.  Strategies are  Brue Force: Isolate errors by  memory dumps are taken,  run-time traces are invoked,  the program is loaded with output statements.  Any one clue is identified in the above activities and entire program will be debugged  It consumes more time Debugging Cause Elimination Backtracking Brute Force
  • 8.  Backtracking:  Most common method for small programs  The errors are backward traced manually  Drawback: if no of lines increased the detection will difficult  Cause elimination:  Introduces binary partitioning  A “cause hypothesis” is  devised and the aforementioned data are used to prove or disprove the hypothesis.  a list of all possible causes is developed and tests are conducted to eliminate each
  • 9. Automated debugging  debugging approaches can be supplemented with debugging tools that can provide you with semi-automated support as debugging strategies are attempted.  Integrated development environments (IDEs) provide a way to capture some of the language specific predetermined errors (e.g., missing end-of-statement characters, undefined variables, and so on) without requiring compilation.”  A wide variety of debugging compilers, dynamic debugging aids (“tracers”), automatic test-case generators, and cross- reference mapping tools are available. However, tools are not a substitute for careful evaluation based on a complete design model and clear source code.
  • 10. Correcting the Error  Once a bug has been found, it must be corrected. Before making the “correction” that removes the cause of a bug:  Is the cause of the bug reproduced in another part of the program?  a program defect is caused by an erroneous pattern of logic that may be reproduced elsewhere. Explicit consideration of the logical pattern mayresult in the discovery of other errors.  What “next bug” might be introduced by the fix I’m about to make?
  • 11.  What could we have done to prevent this bug in the first place?  Before the correction is made, the source code (or, better, the design) should be evaluated to assess coupling of logic and data structures. If the correction is to be made in a highly coupled section of the program, special care must be taken when any change is made.  What could we have done to prevent this bug in the first place?  If you correct the process as well as the product, the bug will be removed from the current program and may be eliminated from all future programs.