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

Object oriented testing
Object oriented testingObject oriented testing
Object oriented testing
Haris Jamil
 
Defining the Problem - Goals and requirements
Defining the Problem - Goals and requirementsDefining the Problem - Goals and requirements
Defining the Problem - Goals and requirements
Stephennancy
 
Chapter 13 software testing strategies
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategies
SHREEHARI WADAWADAGI
 
Phased life cycle model
Phased life cycle modelPhased life cycle model
Phased life cycle model
Stephennancy
 
System Testing.pptx
System Testing.pptxSystem Testing.pptx
System Testing.pptx
KarthigaiSelviS3
 
Staffing level estimation
Staffing level estimation Staffing level estimation
Staffing level estimation
kavitha muneeshwaran
 
Planning the development process
Planning the development processPlanning the development process
Planning the development process
Siva Priya
 
Delphi cost estimation model
Delphi cost estimation modelDelphi cost estimation model
Delphi cost estimation modelShashwat Shriparv
 
Formal Approaches to SQA.pptx
Formal Approaches to SQA.pptxFormal Approaches to SQA.pptx
Formal Approaches to SQA.pptx
KarthigaiSelviS3
 
software cost factor
software cost factorsoftware cost factor
software cost factor
Abinaya B
 
Design Concept software engineering
Design Concept software engineeringDesign Concept software engineering
Design Concept software engineering
Darshit Metaliya
 
Debugging
DebuggingDebugging
Software quality assurance
Software quality assuranceSoftware quality assurance
Software quality assurance
University of Sargodha
 
Unit 1 defects classes
Unit 1 defects classesUnit 1 defects classes
Unit 1 defects classes
Roselin Mary S
 
software project management Artifact set(spm)
software project management Artifact set(spm)software project management Artifact set(spm)
software project management Artifact set(spm)
REHMAT ULLAH
 
Software process and project metrics
Software process and project metricsSoftware process and project metrics
Software process and project metrics
Indu Sharma Bhardwaj
 
Coding and testing in Software Engineering
Coding and testing in Software EngineeringCoding and testing in Software Engineering
Coding and testing in Software Engineering
Abhay Vijay
 
Flow oriented modeling
Flow oriented modelingFlow oriented modeling
Flow oriented modelingramyaaswin
 
Software Testing
Software TestingSoftware Testing
Software Testing
Mousmi Pawar
 

What's hot (20)

Object oriented testing
Object oriented testingObject oriented testing
Object oriented testing
 
Defining the Problem - Goals and requirements
Defining the Problem - Goals and requirementsDefining the Problem - Goals and requirements
Defining the Problem - Goals and requirements
 
Chapter 13 software testing strategies
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategies
 
Phased life cycle model
Phased life cycle modelPhased life cycle model
Phased life cycle model
 
System Testing.pptx
System Testing.pptxSystem Testing.pptx
System Testing.pptx
 
Staffing level estimation
Staffing level estimation Staffing level estimation
Staffing level estimation
 
Planning the development process
Planning the development processPlanning the development process
Planning the development process
 
Delphi cost estimation model
Delphi cost estimation modelDelphi cost estimation model
Delphi cost estimation model
 
Formal Approaches to SQA.pptx
Formal Approaches to SQA.pptxFormal Approaches to SQA.pptx
Formal Approaches to SQA.pptx
 
software cost factor
software cost factorsoftware cost factor
software cost factor
 
Design Concept software engineering
Design Concept software engineeringDesign Concept software engineering
Design Concept software engineering
 
Debugging
DebuggingDebugging
Debugging
 
Software quality assurance
Software quality assuranceSoftware quality assurance
Software quality assurance
 
Unit 1 defects classes
Unit 1 defects classesUnit 1 defects classes
Unit 1 defects classes
 
software project management Artifact set(spm)
software project management Artifact set(spm)software project management Artifact set(spm)
software project management Artifact set(spm)
 
Software process and project metrics
Software process and project metricsSoftware process and project metrics
Software process and project metrics
 
Design techniques
Design techniquesDesign techniques
Design techniques
 
Coding and testing in Software Engineering
Coding and testing in Software EngineeringCoding and testing in Software Engineering
Coding and testing in Software Engineering
 
Flow oriented modeling
Flow oriented modelingFlow oriented modeling
Flow oriented modeling
 
Software Testing
Software TestingSoftware Testing
Software Testing
 

Similar to The Art of Debugging.pptx

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
Vaibhav Khanna
 
Debugging.pdf
Debugging.pdfDebugging.pdf
Debugging.pdf
kumari36
 
Stm unit1
Stm unit1Stm unit1
Stm unit1
Chaitanya Kn
 
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
IOSR Journals
 
Defect effort prediction models in software
Defect effort prediction models in softwareDefect effort prediction models in software
Defect effort prediction models in software
IAEME Publication
 
Inrotduction of Testing
Inrotduction of TestingInrotduction of Testing
Inrotduction of TestingPalash Ghosh
 
Software engg unit 4
Software engg unit 4 Software engg unit 4
Software engg unit 4
Vivek Kumar Sinha
 
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)
EvaNormala
 
EFFECTIVE TEST CASE DESING: A REVIEW
EFFECTIVE TEST CASE DESING: A REVIEWEFFECTIVE TEST CASE DESING: A REVIEW
EFFECTIVE TEST CASE DESING: A REVIEW
Journal For Research
 
O0181397100
O0181397100O0181397100
O0181397100
IOSR Journals
 
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
IRJET Journal
 
Software Testing
 Software Testing  Software Testing
Software Testing
Prof .Pragati Khade
 
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
JayPrakash779563
 
Defect Tracking Software Project Presentation
Defect Tracking Software Project PresentationDefect Tracking Software Project Presentation
Defect Tracking Software Project Presentation
Shiv Prakash
 
sri indu 1213 it
sri indu 1213 itsri indu 1213 it
sri indu 1213 it
jignash
 
Debugging- bajju.pptx
Debugging- bajju.pptxDebugging- bajju.pptx
Debugging- bajju.pptx
ShivamBajaj36
 
Lesson 7...Question Part 1
Lesson 7...Question Part 1Lesson 7...Question Part 1
Lesson 7...Question Part 1
bhushan Nehete
 
SE-Testing.ppt
SE-Testing.pptSE-Testing.ppt
SE-Testing.ppt
vishal choudhary
 
Testing &ampdebugging
Testing &ampdebuggingTesting &ampdebugging
Testing &ampdebugging
rajshreemuthiah
 

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

Software Testing Strategy - Unit4.pptx
Software Testing Strategy - Unit4.pptxSoftware Testing Strategy - Unit4.pptx
Software Testing Strategy - Unit4.pptx
KarthigaiSelviS3
 
Statistical Software Quality Assurance.pptx
Statistical Software Quality Assurance.pptxStatistical Software Quality Assurance.pptx
Statistical Software Quality Assurance.pptx
KarthigaiSelviS3
 
SW Project Process.pptx
SW Project Process.pptxSW Project Process.pptx
SW Project Process.pptx
KarthigaiSelviS3
 
Software Quality assurance.pptx
Software Quality assurance.pptxSoftware Quality assurance.pptx
Software Quality assurance.pptx
KarthigaiSelviS3
 
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
KarthigaiSelviS3
 
CropProduction.pptx
CropProduction.pptxCropProduction.pptx
CropProduction.pptx
KarthigaiSelviS3
 
importance of fitness2.pptx
importance of fitness2.pptximportance of fitness2.pptx
importance of fitness2.pptx
KarthigaiSelviS3
 

More from KarthigaiSelviS3 (7)

Software Testing Strategy - Unit4.pptx
Software Testing Strategy - Unit4.pptxSoftware Testing Strategy - Unit4.pptx
Software Testing Strategy - Unit4.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

space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
top1002
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
ssuser7dcef0
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 

Recently uploaded (20)

space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.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.