SlideShare uma empresa Scribd logo
1 de 8
Debugging
Indu
Sharma
HOD(CSE)
CPTC,
Rajsamand
Introduction
 Debugging occurs as a consequence of
successful testing. That is, when a test
case uncovers an error, debugging is
the process that results in the removal
of the error.
 Debugging has the objective: to find
and correct the cause of a software
error.
Debugging Process
Test
Cases
Execution
Of cases
Results
Debugging
Additional
test
Suspected
causes
Regression
test
Corrections
Identified
causes
Debugging Process
 The debugging process begins with the execution
of a test case.
 Results are assessed and a lack of
correspondence between expected and actual
performance is encountered.
 The debugging process will always have one of two
outcomes:
1. The cause will be found and corrected, or
2. The cause will not be found.
 In the latter case, the person performing debugging
may suspect a cause, design a test case to help
validate that suspicion, and work toward error
correction in an iterative fashion.
Debugging Approaches
 In general, there are three
categories for debugging
approaches:
1. Brute Force
2. Backtracking
3. Cause Elimination
Brute Force
 Take memory dumps, invoke run time
traces, program is loaded with PRINT
statements.
 We hope that in the mass of information
that is produced we will find a clue that can
lead us to the cause of an error.
 Least efficient and quite common.
 More frequently leads to wasted effort and
time.
Backtracking
 Can be used successful in small programs.
 Beginning at the site where a symptom has
been uncovered the source code is traced
backward (manually) until the site of the
cause is found.
 Disadvantage: as the number of source line
increases, the number of potential paths
may become unmanageably large.
Cause Elimination
 Introduces the concept of binary
partitioning.
 Uses binary partitioning to reduce the
number of locations potential where
errors can exist
 Isolate potential causes, devise
cause hypotheses tests to isolate bug.

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Procedural vs. object oriented programming
Procedural vs. object oriented programmingProcedural vs. object oriented programming
Procedural vs. object oriented programming
 
Protection and Security in Operating Systems
Protection and Security in Operating SystemsProtection and Security in Operating Systems
Protection and Security in Operating Systems
 
Java threads
Java threadsJava threads
Java threads
 
Software quality assurance
Software quality assuranceSoftware quality assurance
Software quality assurance
 
Java swing
Java swingJava swing
Java swing
 
QSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and JitQSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and Jit
 
Java - Exception Handling Concepts
Java - Exception Handling ConceptsJava - Exception Handling Concepts
Java - Exception Handling Concepts
 
Features of java
Features of javaFeatures of java
Features of java
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops concepts
 
Object oriented testing
Object oriented testingObject oriented testing
Object oriented testing
 
The Art Of Debugging
The Art Of DebuggingThe Art Of Debugging
The Art Of Debugging
 
Path Testing
Path TestingPath Testing
Path Testing
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
 
Black box testing or behavioral testing
Black box testing or behavioral testingBlack box testing or behavioral testing
Black box testing or behavioral testing
 
Software coding and testing
Software coding and testingSoftware coding and testing
Software coding and testing
 
Ooad unit – 1 introduction
Ooad unit – 1 introductionOoad unit – 1 introduction
Ooad unit – 1 introduction
 
Software Testing and Debugging
Software Testing and DebuggingSoftware Testing and Debugging
Software Testing and Debugging
 
Design Concept software engineering
Design Concept software engineeringDesign Concept software engineering
Design Concept software engineering
 
Threads in JAVA
Threads in JAVAThreads in JAVA
Threads in JAVA
 
Loaders ( system programming )
Loaders ( system programming ) Loaders ( system programming )
Loaders ( system programming )
 

Destaque (19)

Debugging by induction
Debugging by inductionDebugging by induction
Debugging by induction
 
Notes on Debugging
Notes on DebuggingNotes on Debugging
Notes on Debugging
 
Debugging Debugging
Debugging DebuggingDebugging Debugging
Debugging Debugging
 
Simulation PowerPoint
Simulation PowerPointSimulation PowerPoint
Simulation PowerPoint
 
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
 
Emulation and simulation
Emulation and simulationEmulation and simulation
Emulation and simulation
 
GCC, GNU compiler collection
GCC, GNU compiler collectionGCC, GNU compiler collection
GCC, GNU compiler collection
 
Compilers
CompilersCompilers
Compilers
 
compiler and their types
compiler and their typescompiler and their types
compiler and their types
 
Difference Between Emulation & Simulation
Difference Between Emulation & SimulationDifference Between Emulation & Simulation
Difference Between Emulation & Simulation
 
Introduction to compiler
Introduction to compilerIntroduction to compiler
Introduction to compiler
 
Assembler
AssemblerAssembler
Assembler
 
Testing techniques
Testing techniquesTesting techniques
Testing techniques
 
Introduction to Simulation
Introduction to SimulationIntroduction to Simulation
Introduction to Simulation
 
SIMULATION
SIMULATIONSIMULATION
SIMULATION
 
Assemblers
AssemblersAssemblers
Assemblers
 
Assembler
AssemblerAssembler
Assembler
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and types
 
Two pass Assembler
Two pass AssemblerTwo pass Assembler
Two pass Assembler
 

Semelhante a Debugging

Debugging.pdf
Debugging.pdfDebugging.pdf
Debugging.pdfkumari36
 
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
 
fundamentals of testing (Fundamental of testing what)
fundamentals of testing (Fundamental of testing what)fundamentals of testing (Fundamental of testing what)
fundamentals of testing (Fundamental of testing what)diana fitri, S.Kom
 
Fundamentals of testing 2
Fundamentals of testing 2Fundamentals of testing 2
Fundamentals of testing 2seli purnianda
 
FADHILLA ELITA Ppt Chapter 1
FADHILLA ELITA Ppt Chapter 1FADHILLA ELITA Ppt Chapter 1
FADHILLA ELITA Ppt Chapter 1fadhilla elita
 
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 debuggingVaibhav Khanna
 
Software testing and process
Software testing and processSoftware testing and process
Software testing and processgouravkalbalia
 
Software testing strategy
Software testing strategySoftware testing strategy
Software testing strategyijseajournal
 
Fundamental of testing (what is testing)
Fundamental of testing (what is testing)Fundamental of testing (what is testing)
Fundamental of testing (what is testing)helfa safitri
 
Fundamentals of testing what is testing (reference graham et.al (2006))
Fundamentals of testing   what is testing (reference graham et.al (2006))Fundamentals of testing   what is testing (reference graham et.al (2006))
Fundamentals of testing what is testing (reference graham et.al (2006))Alfarizi ,S.Kom
 
Fundamentals of testing (what is testing)
Fundamentals of testing (what is testing)Fundamentals of testing (what is testing)
Fundamentals of testing (what is testing)Dhy Ardiansyah
 
Blackboxtesting 02 An Example Test Series
Blackboxtesting 02 An Example Test SeriesBlackboxtesting 02 An Example Test Series
Blackboxtesting 02 An Example Test Seriesnazeer pasha
 
Debugging- bajju.pptx
Debugging- bajju.pptxDebugging- bajju.pptx
Debugging- bajju.pptxShivamBajaj36
 

Semelhante a Debugging (20)

Debugging.pdf
Debugging.pdfDebugging.pdf
Debugging.pdf
 
The Art of Debugging.pptx
The Art of Debugging.pptxThe Art of Debugging.pptx
The Art of Debugging.pptx
 
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)
 
fundamentals of testing (Fundamental of testing what)
fundamentals of testing (Fundamental of testing what)fundamentals of testing (Fundamental of testing what)
fundamentals of testing (Fundamental of testing what)
 
50120140501001
5012014050100150120140501001
50120140501001
 
Fundamentals of testing 2
Fundamentals of testing 2Fundamentals of testing 2
Fundamentals of testing 2
 
FADHILLA ELITA Ppt Chapter 1
FADHILLA ELITA Ppt Chapter 1FADHILLA ELITA Ppt Chapter 1
FADHILLA ELITA Ppt Chapter 1
 
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
 
Software testing and process
Software testing and processSoftware testing and process
Software testing and process
 
Software testing strategy
Software testing strategySoftware testing strategy
Software testing strategy
 
Fundamental of testing (what is testing)
Fundamental of testing (what is testing)Fundamental of testing (what is testing)
Fundamental of testing (what is testing)
 
Testing &ampdebugging
Testing &ampdebuggingTesting &ampdebugging
Testing &ampdebugging
 
Fundamentals of testing what is testing (reference graham et.al (2006))
Fundamentals of testing   what is testing (reference graham et.al (2006))Fundamentals of testing   what is testing (reference graham et.al (2006))
Fundamentals of testing what is testing (reference graham et.al (2006))
 
Fundamentals of testing (what is testing)
Fundamentals of testing (what is testing)Fundamentals of testing (what is testing)
Fundamentals of testing (what is testing)
 
Stm unit1
Stm unit1Stm unit1
Stm unit1
 
Debbuger
DebbugerDebbuger
Debbuger
 
Blackboxtesting 02 An Example Test Series
Blackboxtesting 02 An Example Test SeriesBlackboxtesting 02 An Example Test Series
Blackboxtesting 02 An Example Test Series
 
Debugging- bajju.pptx
Debugging- bajju.pptxDebugging- bajju.pptx
Debugging- bajju.pptx
 
Software engg unit 4
Software engg unit 4 Software engg unit 4
Software engg unit 4
 
O0181397100
O0181397100O0181397100
O0181397100
 

Mais de Indu Sharma Bhardwaj (18)

E model
E modelE model
E model
 
E commerce
E commerceE commerce
E commerce
 
Ui design final
Ui design finalUi design final
Ui design final
 
Testing
TestingTesting
Testing
 
Software re engineering
Software re engineeringSoftware re engineering
Software re engineering
 
Software project management 3
Software project management 3Software project management 3
Software project management 3
 
Software project management
Software project managementSoftware project management
Software project management
 
Software process and project metrics
Software process and project metricsSoftware process and project metrics
Software process and project metrics
 
Software maintenance
Software maintenanceSoftware maintenance
Software maintenance
 
Software resuse
Software  resuseSoftware  resuse
Software resuse
 
Risk analysis
Risk analysisRisk analysis
Risk analysis
 
Design final
Design finalDesign final
Design final
 
10 common english mistakes
10 common english mistakes10 common english mistakes
10 common english mistakes
 
3. jvm
3. jvm3. jvm
3. jvm
 
6. static keyword
6. static keyword6. static keyword
6. static keyword
 
4. method overloading
4. method overloading4. method overloading
4. method overloading
 
2. hello java
2. hello java2. hello java
2. hello java
 
1 .java basic
1 .java basic1 .java basic
1 .java basic
 

Último

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 

Último (20)

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 

Debugging

  • 2. Introduction  Debugging occurs as a consequence of successful testing. That is, when a test case uncovers an error, debugging is the process that results in the removal of the error.  Debugging has the objective: to find and correct the cause of a software error.
  • 4. Debugging Process  The debugging process begins with the execution of a test case.  Results are assessed and a lack of correspondence between expected and actual performance is encountered.  The debugging process will always have one of two outcomes: 1. The cause will be found and corrected, or 2. The cause will not be found.  In the latter case, the person performing debugging may suspect a cause, design a test case to help validate that suspicion, and work toward error correction in an iterative fashion.
  • 5. Debugging Approaches  In general, there are three categories for debugging approaches: 1. Brute Force 2. Backtracking 3. Cause Elimination
  • 6. Brute Force  Take memory dumps, invoke run time traces, program is loaded with PRINT statements.  We hope that in the mass of information that is produced we will find a clue that can lead us to the cause of an error.  Least efficient and quite common.  More frequently leads to wasted effort and time.
  • 7. Backtracking  Can be used successful in small programs.  Beginning at the site where a symptom has been uncovered the source code is traced backward (manually) until the site of the cause is found.  Disadvantage: as the number of source line increases, the number of potential paths may become unmanageably large.
  • 8. Cause Elimination  Introduces the concept of binary partitioning.  Uses binary partitioning to reduce the number of locations potential where errors can exist  Isolate potential causes, devise cause hypotheses tests to isolate bug.