SlideShare une entreprise Scribd logo
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) ”
.

Contenu connexe

Similaire à Debugging- bajju.pptx

debugging (1).ppt
debugging (1).pptdebugging (1).ppt
debugging (1).ppt
jerlinS1
 
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
 
Software Testing
 Software Testing  Software Testing
Software Testing
Prof .Pragati Khade
 
Debugging.pdf
Debugging.pdfDebugging.pdf
Debugging.pdf
kumari36
 
Stm unit1
Stm unit1Stm unit1
Stm unit1
Chaitanya Kn
 
Debugging Presentation Rehman Ali.pptx
Debugging Presentation Rehman Ali.pptxDebugging Presentation Rehman Ali.pptx
Debugging Presentation Rehman Ali.pptx
RehmanAli69
 
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
QA 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 Stuntz
QA 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 debugging
Vaibhav Khanna
 
Debugging
DebuggingDebugging
Debugging
Ajeng Savitri
 
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
Johan 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.pdf
NALANDACSCCENTRE
 
Presentation on debugging
Presentation on debuggingPresentation on debugging
Presentation on debugging
swati kushwaha
 
Debugging by induction
Debugging by inductionDebugging by induction
Debugging by induction
Waqar Ali
 
software testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbsoftware testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblb
jeyasrig
 
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
 
Maheen oop
Maheen oopMaheen oop
Maheen oop
mahshah212
 
It Works On Dev
It Works On DevIt Works On Dev
It Works On Dev
marcelesser
 
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
 
FADHILLA ELITA Ppt Chapter 1
FADHILLA ELITA Ppt Chapter 1FADHILLA ELITA Ppt Chapter 1
FADHILLA ELITA Ppt Chapter 1
fadhilla elita
 

Similaire à 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
 

Dernier

一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Seminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptxSeminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptx
Madan Karki
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
UReason
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
architagupta876
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
PKavitha10
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
Las Vegas Warehouse
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
Divyanshu
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
Gino153088
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
LAXMAREDDY22
 

Dernier (20)

一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Seminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptxSeminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptx
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.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) ” .

Notes de l'éditeur

  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 .