SlideShare ist ein Scribd-Unternehmen logo
1 von 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) ”
.

Weitere ähnliche Inhalte

Ähnlich wie Debugging- bajju.pptx

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
NALANDACSCCENTRE
 
software testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbsoftware testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblb
jeyasrig
 
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
Chris Parnin
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Lovely Professional University
 
Teachers record management system project report..pdf
Teachers record management system project report..pdfTeachers record management system project report..pdf
Teachers record management system project report..pdf
Kamal Acharya
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 

Kürzlich hochgeladen (20)

Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfInstruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
How to Design and spec harmonic filter.pdf
How to Design and spec harmonic filter.pdfHow to Design and spec harmonic filter.pdf
How to Design and spec harmonic filter.pdf
 
ANSI(ST)-III_Manufacturing-I_05052020.pdf
ANSI(ST)-III_Manufacturing-I_05052020.pdfANSI(ST)-III_Manufacturing-I_05052020.pdf
ANSI(ST)-III_Manufacturing-I_05052020.pdf
 
Artificial Intelligence Bayesian Reasoning
Artificial Intelligence Bayesian ReasoningArtificial Intelligence Bayesian Reasoning
Artificial Intelligence Bayesian Reasoning
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.
 
E-Commerce Shopping using MERN Stack where different modules are present
E-Commerce Shopping using MERN Stack where different modules are presentE-Commerce Shopping using MERN Stack where different modules are present
E-Commerce Shopping using MERN Stack where different modules are present
 
15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon
 
Theory for How to calculation capacitor bank
Theory for How to calculation capacitor bankTheory for How to calculation capacitor bank
Theory for How to calculation capacitor bank
 
Lab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docxLab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docx
 
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
 
Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...
 
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
 
Teachers record management system project report..pdf
Teachers record management system project report..pdfTeachers record management system project report..pdf
Teachers record management system project report..pdf
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
 
Intelligent Agents, A discovery on How A Rational Agent Acts
Intelligent Agents, A discovery on How A Rational Agent ActsIntelligent Agents, A discovery on How A Rational Agent Acts
Intelligent Agents, A discovery on How A Rational Agent Acts
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
 

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) ” .

Hinweis der Redaktion

  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 .