SlideShare una empresa de Scribd logo
1 de 23
DEBUGGING
What is Debugging ?
◙ It is the process of fixing a bug in the software. In other words, it refers to
identifying, analyzing and removing errors.
◙ Debugging occurs as a consequence of successful testing .
◙ Debugging is not testing but often occurs as a consequence of testing .
Outcomes of Debugging :-
The debugging process will usually have one of two outcomes -
◙ The cause will be found and corrected or
◙ the cause will not be found .
Difference between Testing and
Debugging -
Testing is a process of finding bugs or
errors in a software product that is
done manually by tester or can be
automated.
Debugging is a process of fixing the
bugs found in testing phase .
Programmer or developer is
responsible for debugging and it can’t
be automated
BUG
A software bug is an error, flaw, failure or
fault in a computer program or system that
causes it to produce an incorrect or
unexpected result, or to behave in
unintended ways. The process of finding
and fixing bugs is termed "debugging"
A mistake in coding is called Error, error found by tester is called
Defect, defect accepted by development team then it is called Bug,
build does not meet the requirements then it Is Failure.”
Debugging Strategies
Debugging has one overriding objective - to find and correct cause of software error or
defect . The objective is a realized by a combination of systematic evaluation , intuition
and luck .
Eg.- A lamp in shivam’s house does not work . if nothing in the house works , the cause
must be in the main circuit breaker or outside ; shivam look around to see whether the
neighborhood is blacked out . I plug the suspect lamp into working socket and working
appliance into a suspect circuit . So goes the alternation of hypothesis and test .
Methods of Debugging -
◘ It is the common and least efficient method . this method is applied when
all else fails .
◘ Using a ‘ Let the computer find the error ’ philosophy ,
◘ memory dumps are taken , run time traces are invoked .
◘ scatter print statements throughout your program.
◘ Debugging with automated debugging tools .
Brute Force
Induction
◘ It is a debugging strategy .
◘ In other words , it is called reasoning and thoughtful strategy .
◘ It starts with symptoms of error , possibly in result of one or more test cases
and looking for the relationships among the symptoms , the error is often
uncovered .
General Example :-
◘ Last few times , shivam cuts his hair , it grew back . Inductive reasoning allows him to
generalize that after he cut his hair , it will always grew back .
Deduction
The process of deduction proceeds from some general theories or premises,
using the processes of elimination and refinement, to arrive at a conclusion
(the location of the error).
“ Something impossible occurred , only solid
information is that it did occur . So we must
think backwards from the results to discover the
reasons . ”
The art of deduction
Backtracking
◙ This method is effectively used for locating errors in small programs .This
method starts at the location where a symptom has been uncovered .
◙ we have to start tracing the program backward one step at a time
evaluating the values of all variables until the cause of error is found.
◙ The resulting debugger offers a structured view of dynamic events, similar
to lexical scope rules' effect on static visibility.
◙ This strategy is useful but in a large program with many thousands lines of
code, the number of backward paths increases and becomes unmanageably
large.
In other words, start at the point where program gives incorrect result .
At this point you must deduce from output .By performing a mental reverse
execution of block from this point and repeat using the process of -
“ If this was the state of program at this point , then this must have been the
state of program up here ” .
Cause Elimination
It is manifested by induction or deduction and introduces the concept of
binary partitioning .
A “cause hypothesis ” is devised and the aforementioned data are used to
prove or disprove the hypothesis .
Debugging Tools
◙ Each of the above debugging approaches can be
supplemented with debugging tools. For debugging we can
apply wide variety of debugging tools such as debugging
compilers, dynamic debugging aids, automatic test case
generators, memory dumps and cross reference maps.
◙ WinDbg is a multipurpose debugger for the Microsoft Windows computer operating system
. It can be used to debug user mode applications, device drivers, and the operating system
itself in kernel mode (kernel based memory dumps ) .
◙ dbx is a source-level debugger found primarily on Solaris, AIX, IRIX, Tru64 UNIX, Linux
and BSD operating systems. It provides symbolic debugging for programs written in C, C++,
Pascal, FORTRAN and Java.
◙ The GNU Debugger (GDB) is a portable debugger that runs on many Unix-like systems
and works for many programming languages .
◙ Xcode - macOS ◙ ADB ◙ LLDB debugger
◙ Immunity Debugger
To fix bug - Fix the bug not symptoms
Thank You
“ Fixing a bug (1.0) always create a new bug (1.1) ”
.

Más contenido relacionado

Similar a Debugging- bajju.pptx

debugging (1).ppt
debugging (1).pptdebugging (1).ppt
debugging (1).pptjerlinS1
 
An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...jeyasrig
 
Debugging.pdf
Debugging.pdfDebugging.pdf
Debugging.pdfkumari36
 
Debugging Presentation Rehman Ali.pptx
Debugging Presentation Rehman Ali.pptxDebugging Presentation Rehman Ali.pptx
Debugging Presentation Rehman Ali.pptxRehmanAli69
 
The limits of unit testing by Craig Stuntz
The limits of unit testing by Craig StuntzThe limits of unit testing by Craig Stuntz
The limits of unit testing by Craig StuntzQA or the Highway
 
The Limits of Unit Testing by Craig Stuntz
The Limits of Unit Testing by Craig StuntzThe Limits of Unit Testing by Craig Stuntz
The Limits of Unit Testing by Craig StuntzQA or the Highway
 
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
 
Approaches to unraveling a complex test problem
Approaches to unraveling a complex test problemApproaches to unraveling a complex test problem
Approaches to unraveling a complex test problemJohan Hoberg
 
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdfVISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdfNALANDACSCCENTRE
 
Presentation on debugging
Presentation on debuggingPresentation on debugging
Presentation on debuggingswati kushwaha
 
Debugging by induction
Debugging by inductionDebugging by induction
Debugging by inductionWaqar Ali
 
software testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbsoftware testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbjeyasrig
 
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
 
Are Automated Debugging Techniques Actually Helping Programmers
Are Automated Debugging Techniques Actually Helping ProgrammersAre Automated Debugging Techniques Actually Helping Programmers
Are Automated Debugging Techniques Actually Helping ProgrammersChris Parnin
 
FADHILLA ELITA Ppt Chapter 1
FADHILLA ELITA Ppt Chapter 1FADHILLA ELITA Ppt Chapter 1
FADHILLA ELITA Ppt Chapter 1fadhilla elita
 

Similar a Debugging- bajju.pptx (20)

debugging (1).ppt
debugging (1).pptdebugging (1).ppt
debugging (1).ppt
 
An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...
 
Software Testing
 Software Testing  Software Testing
Software Testing
 
Debugging.pdf
Debugging.pdfDebugging.pdf
Debugging.pdf
 
Stm unit1
Stm unit1Stm unit1
Stm unit1
 
Debugging Presentation Rehman Ali.pptx
Debugging Presentation Rehman Ali.pptxDebugging Presentation Rehman Ali.pptx
Debugging Presentation Rehman Ali.pptx
 
The limits of unit testing by Craig Stuntz
The limits of unit testing by Craig StuntzThe limits of unit testing by Craig Stuntz
The limits of unit testing by Craig Stuntz
 
The Limits of Unit Testing by Craig Stuntz
The Limits of Unit Testing by Craig StuntzThe Limits of Unit Testing by Craig Stuntz
The Limits of Unit Testing by Craig Stuntz
 
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
DebuggingDebugging
Debugging
 
Approaches to unraveling a complex test problem
Approaches to unraveling a complex test problemApproaches to unraveling a complex test problem
Approaches to unraveling a complex test problem
 
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdfVISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
 
Presentation on debugging
Presentation on debuggingPresentation on debugging
Presentation on debugging
 
Debugging by induction
Debugging by inductionDebugging by induction
Debugging by induction
 
software testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbsoftware testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblb
 
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))
 
Maheen oop
Maheen oopMaheen oop
Maheen oop
 
It Works On Dev
It Works On DevIt Works On Dev
It Works On Dev
 
Are Automated Debugging Techniques Actually Helping Programmers
Are Automated Debugging Techniques Actually Helping ProgrammersAre Automated Debugging Techniques Actually Helping Programmers
Are Automated Debugging Techniques Actually Helping Programmers
 
FADHILLA ELITA Ppt Chapter 1
FADHILLA ELITA Ppt Chapter 1FADHILLA ELITA Ppt Chapter 1
FADHILLA ELITA Ppt Chapter 1
 

Último

Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 

Último (20)

Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 

Debugging- bajju.pptx

  • 2. What is Debugging ? ◙ It is the process of fixing a bug in the software. In other words, it refers to identifying, analyzing and removing errors. ◙ Debugging occurs as a consequence of successful testing . ◙ Debugging is not testing but often occurs as a consequence of testing .
  • 3. Outcomes of Debugging :- The debugging process will usually have one of two outcomes - ◙ The cause will be found and corrected or ◙ the cause will not be found .
  • 4.
  • 5. Difference between Testing and Debugging - Testing is a process of finding bugs or errors in a software product that is done manually by tester or can be automated. Debugging is a process of fixing the bugs found in testing phase . Programmer or developer is responsible for debugging and it can’t be automated
  • 6. BUG A software bug is an error, flaw, failure or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways. The process of finding and fixing bugs is termed "debugging" A mistake in coding is called Error, error found by tester is called Defect, defect accepted by development team then it is called Bug, build does not meet the requirements then it Is Failure.”
  • 7.
  • 8.
  • 9. Debugging Strategies Debugging has one overriding objective - to find and correct cause of software error or defect . The objective is a realized by a combination of systematic evaluation , intuition and luck . Eg.- A lamp in shivam’s house does not work . if nothing in the house works , the cause must be in the main circuit breaker or outside ; shivam look around to see whether the neighborhood is blacked out . I plug the suspect lamp into working socket and working appliance into a suspect circuit . So goes the alternation of hypothesis and test .
  • 10. Methods of Debugging - ◘ It is the common and least efficient method . this method is applied when all else fails . ◘ Using a ‘ Let the computer find the error ’ philosophy , ◘ memory dumps are taken , run time traces are invoked . ◘ scatter print statements throughout your program. ◘ Debugging with automated debugging tools . Brute Force
  • 11.
  • 12. Induction ◘ It is a debugging strategy . ◘ In other words , it is called reasoning and thoughtful strategy . ◘ It starts with symptoms of error , possibly in result of one or more test cases and looking for the relationships among the symptoms , the error is often uncovered .
  • 13. General Example :- ◘ Last few times , shivam cuts his hair , it grew back . Inductive reasoning allows him to generalize that after he cut his hair , it will always grew back .
  • 14. Deduction The process of deduction proceeds from some general theories or premises, using the processes of elimination and refinement, to arrive at a conclusion (the location of the error). “ Something impossible occurred , only solid information is that it did occur . So we must think backwards from the results to discover the reasons . ”
  • 15. The art of deduction
  • 16. Backtracking ◙ This method is effectively used for locating errors in small programs .This method starts at the location where a symptom has been uncovered . ◙ we have to start tracing the program backward one step at a time evaluating the values of all variables until the cause of error is found. ◙ The resulting debugger offers a structured view of dynamic events, similar to lexical scope rules' effect on static visibility. ◙ This strategy is useful but in a large program with many thousands lines of code, the number of backward paths increases and becomes unmanageably large.
  • 17. In other words, start at the point where program gives incorrect result . At this point you must deduce from output .By performing a mental reverse execution of block from this point and repeat using the process of - “ If this was the state of program at this point , then this must have been the state of program up here ” .
  • 18. Cause Elimination It is manifested by induction or deduction and introduces the concept of binary partitioning . A “cause hypothesis ” is devised and the aforementioned data are used to prove or disprove the hypothesis .
  • 19. Debugging Tools ◙ Each of the above debugging approaches can be supplemented with debugging tools. For debugging we can apply wide variety of debugging tools such as debugging compilers, dynamic debugging aids, automatic test case generators, memory dumps and cross reference maps.
  • 20.
  • 21. ◙ WinDbg is a multipurpose debugger for the Microsoft Windows computer operating system . It can be used to debug user mode applications, device drivers, and the operating system itself in kernel mode (kernel based memory dumps ) . ◙ dbx is a source-level debugger found primarily on Solaris, AIX, IRIX, Tru64 UNIX, Linux and BSD operating systems. It provides symbolic debugging for programs written in C, C++, Pascal, FORTRAN and Java. ◙ The GNU Debugger (GDB) is a portable debugger that runs on many Unix-like systems and works for many programming languages . ◙ Xcode - macOS ◙ ADB ◙ LLDB debugger ◙ Immunity Debugger
  • 22. To fix bug - Fix the bug not symptoms
  • 23. Thank You “ Fixing a bug (1.0) always create a new bug (1.1) ” .

Notas del editor

  1. I.e when a test case uncovers an error , debugging is the process that results in the removal of error . For eg . When heart started to love , Brain spotted love as functional error and tried to debug it .
  2. Firstly test cases are created Then all the cases are executed After it we get results of testing , we debug , Suspeccted cause - if there is any suspected cause - Additional test then again test cases Identified cause - correct it - regression test - system update does not reintroduce error - regression test aim at checking - 1 Functionality - black box 2 . Architecture - grey box
  3. Dynamic testing - variable changes with time . Testing - eg web - Selenium App - jenkins
  4. Failure - When a defect reaches the end customer it is called a Failure. Fault - An incorrect step, process or data definition in a computer program which causes the program to perform in an unintended or unanticipated manner.
  5. Denial Self - Blame Anger Depression Accep[tance
  6. Understand the system means understand frameworks , read api’s , etc Start at beginning Gather low level details and see failure Divide and conquer the code , fix the noise first , but don’t go nuts Change one variable first and restart , choose rifle not shotgun Keep an audit trail - write down these - what u did , in what order , etc Check plug - question assumptions .
  7. Brute force is trial and error method Memory dumps - process in which contents of memory are displayed and stored , in case of system crash , these dumps are used to examine the status of program . Runtime Tracing is a feature for monitoring real-time dynamic interaction analysis of code. Runtime Tracing uses exclusive Source Code Insertion (SCI) instrumentation technology to generate trace data, which is turned into UML sequence diagrams . Tracing feature outputs a static .tsf file for each instrumented source file as well as a dynamic .tdf file.
  8. First step is enumeration , all u know about is what program did correctly and incorrectly . Observe the patterns . Relationship 4 . by relationship , devise a hypothesis , one or more 5. Proove the hypothesis , not skip this , if you skip , these u are only skipping symptoms , not a bug .
  9. Develop list of concievable causes of error . Examine all data by looking contradictons, try to eliminate . Refine hypothesis .
  10. Checkpoints are marked , checkpointing schemes are used , like print statements . Lexical scope is a convention used with many programming languages that sets the scope (range of functionality) of a variable .
  11. Eg of debug tool is rasperry pi .