SlideShare a Scribd company logo
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

What's hot

The Art Of Debugging
The Art Of DebuggingThe Art Of Debugging
The Art Of Debugging
svilen.ivanov
 
10 software maintenance
10 software maintenance10 software maintenance
10 software maintenance
akiara
 

What's hot (20)

Communication primitives
Communication primitivesCommunication primitives
Communication primitives
 
Design notation
Design notationDesign notation
Design notation
 
Chapter 2 software process models
Chapter 2   software process modelsChapter 2   software process models
Chapter 2 software process models
 
RMMM Plan
RMMM PlanRMMM Plan
RMMM Plan
 
Chapter 1 2 - some size factors
Chapter 1   2 - some size factorsChapter 1   2 - some size factors
Chapter 1 2 - some size factors
 
Software myths | Software Engineering Notes
Software myths | Software Engineering NotesSoftware myths | Software Engineering Notes
Software myths | Software Engineering Notes
 
Software engineering a practitioners approach 8th edition pressman solutions ...
Software engineering a practitioners approach 8th edition pressman solutions ...Software engineering a practitioners approach 8th edition pressman solutions ...
Software engineering a practitioners approach 8th edition pressman solutions ...
 
The Art Of Debugging
The Art Of DebuggingThe Art Of Debugging
The Art Of Debugging
 
Software cost estimation techniques presentation
Software cost estimation techniques presentationSoftware cost estimation techniques presentation
Software cost estimation techniques presentation
 
10 software maintenance
10 software maintenance10 software maintenance
10 software maintenance
 
Fundamental design concepts
Fundamental design conceptsFundamental design concepts
Fundamental design concepts
 
Quality and productivity factors
Quality and productivity factorsQuality and productivity factors
Quality and productivity factors
 
Risk management(software engineering)
Risk management(software engineering)Risk management(software engineering)
Risk management(software engineering)
 
unit testing and debugging
unit testing and debuggingunit testing and debugging
unit testing and debugging
 
Cyclomatic complexity
Cyclomatic complexityCyclomatic complexity
Cyclomatic complexity
 
Coupling and cohesion
Coupling and cohesionCoupling and cohesion
Coupling and cohesion
 
Software Testing Strategy - Unit4.pptx
Software Testing Strategy - Unit4.pptxSoftware Testing Strategy - Unit4.pptx
Software Testing Strategy - Unit4.pptx
 
Chapter 6 software metrics
Chapter 6 software metricsChapter 6 software metrics
Chapter 6 software metrics
 
Formal Approaches to SQA.pptx
Formal Approaches to SQA.pptxFormal Approaches to SQA.pptx
Formal Approaches to SQA.pptx
 
Integration testing
Integration testingIntegration testing
Integration testing
 

Similar to The Art of Debugging.pptx

Inrotduction of Testing
Inrotduction of TestingInrotduction of Testing
Inrotduction of Testing
Palash Ghosh
 

Similar to The Art of Debugging.pptx (20)

Software engineering 22 error detection and debugging
Software engineering 22 error detection and debuggingSoftware engineering 22 error detection and debugging
Software engineering 22 error detection and debugging
 
Debugging.pdf
Debugging.pdfDebugging.pdf
Debugging.pdf
 
Stm unit1
Stm unit1Stm unit1
Stm unit1
 
bug-advocacy
bug-advocacybug-advocacy
bug-advocacy
 
Effective Bug Tracking Systems: Theories and Implementation
Effective Bug Tracking Systems: Theories and ImplementationEffective Bug Tracking Systems: Theories and Implementation
Effective Bug Tracking Systems: Theories and Implementation
 
Defect effort prediction models in software
Defect effort prediction models in softwareDefect effort prediction models in software
Defect effort prediction models in software
 
Inrotduction of Testing
Inrotduction of TestingInrotduction of Testing
Inrotduction of Testing
 
Software engg unit 4
Software engg unit 4 Software engg unit 4
Software engg unit 4
 
Chapter 1 Fundamental of testing (By Eva Normala)
Chapter 1 Fundamental of testing (By Eva Normala)Chapter 1 Fundamental of testing (By Eva Normala)
Chapter 1 Fundamental of testing (By Eva Normala)
 
EFFECTIVE TEST CASE DESING: A REVIEW
EFFECTIVE TEST CASE DESING: A REVIEWEFFECTIVE TEST CASE DESING: A REVIEW
EFFECTIVE TEST CASE DESING: A REVIEW
 
O0181397100
O0181397100O0181397100
O0181397100
 
IRJET- Technique of Finding the Defect in Software Testing
IRJET- Technique of Finding the Defect in Software TestingIRJET- Technique of Finding the Defect in Software Testing
IRJET- Technique of Finding the Defect in Software Testing
 
Software Testing
 Software Testing  Software Testing
Software Testing
 
Software Testing overview jay prakash maurya.pptx
Software Testing overview jay prakash maurya.pptxSoftware Testing overview jay prakash maurya.pptx
Software Testing overview jay prakash maurya.pptx
 
Defect Tracking Software Project Presentation
Defect Tracking Software Project PresentationDefect Tracking Software Project Presentation
Defect Tracking Software Project Presentation
 
sri indu 1213 it
sri indu 1213 itsri indu 1213 it
sri indu 1213 it
 
Debugging- bajju.pptx
Debugging- bajju.pptxDebugging- bajju.pptx
Debugging- bajju.pptx
 
Lesson 7...Question Part 1
Lesson 7...Question Part 1Lesson 7...Question Part 1
Lesson 7...Question Part 1
 
SE-Testing.ppt
SE-Testing.pptSE-Testing.ppt
SE-Testing.ppt
 
Testing &ampdebugging
Testing &ampdebuggingTesting &ampdebugging
Testing &ampdebugging
 

More from KarthigaiSelviS3

More from KarthigaiSelviS3 (7)

System Testing.pptx
System Testing.pptxSystem Testing.pptx
System Testing.pptx
 
Statistical Software Quality Assurance.pptx
Statistical Software Quality Assurance.pptxStatistical Software Quality Assurance.pptx
Statistical Software Quality Assurance.pptx
 
SW Project Process.pptx
SW Project Process.pptxSW Project Process.pptx
SW Project Process.pptx
 
Software Quality assurance.pptx
Software Quality assurance.pptxSoftware Quality assurance.pptx
Software Quality assurance.pptx
 
Design Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptxDesign Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptx
 
CropProduction.pptx
CropProduction.pptxCropProduction.pptx
CropProduction.pptx
 
importance of fitness2.pptx
importance of fitness2.pptximportance of fitness2.pptx
importance of fitness2.pptx
 

Recently uploaded

Digital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdfDigital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdf
AbrahamGadissa
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Paint shop management system project report.pdf
Paint shop management system project report.pdfPaint shop management system project report.pdf
Paint shop management system project report.pdf
Kamal Acharya
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
Kamal Acharya
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

Top 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering ScientistTop 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering Scientist
 
Digital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdfDigital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdf
 
Electrical shop management system project report.pdf
Electrical shop management system project report.pdfElectrical shop management system project report.pdf
Electrical shop management system project report.pdf
 
NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...
NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...
NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...
 
Maestro Scripting Language CNC programacion
Maestro Scripting Language CNC programacionMaestro Scripting Language CNC programacion
Maestro Scripting Language CNC programacion
 
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-5 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical Engineering
 
2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge
 
KIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and Clustering
KIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and ClusteringKIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and Clustering
KIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and Clustering
 
Natalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in KrakówNatalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in Kraków
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdfA CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
 
retail automation billing system ppt.pptx
retail automation billing system ppt.pptxretail automation billing system ppt.pptx
retail automation billing system ppt.pptx
 
Paint shop management system project report.pdf
Paint shop management system project report.pdfPaint shop management system project report.pdf
Paint shop management system project report.pdf
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
 
An improvement in the safety of big data using blockchain technology
An improvement in the safety of big data using blockchain technologyAn improvement in the safety of big data using blockchain technology
An improvement in the safety of big data using blockchain technology
 
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWINGBRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
 
A case study of cinema management system project report..pdf
A case study of cinema management system project report..pdfA case study of cinema management system project report..pdf
A case study of cinema management system project report..pdf
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdf
 

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 kkgruugpg@gmail.com
  • 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.