Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware thus making it behave as expected. A software bug (or just “bug” is an error flaw mistake Failure, fault or “undocumented feature” in a Computer program that prevents it Computer programs (also software programs, or just programs) are instructions for a Computer. Electronic hardware refers to interconnected electronic components which perform analog and/or Logic operations on received and locally stored Information Debugging tends to be harder when various subsystems are tightly coupled, as changes in one may cause bugs to emerge in another. In Computer science, coupling or dependency is the degree to which each program module relies on each one of the other modules
Contents |
There is some controversy over the origin of the term "debugging. " The terms "bug" and "debugging" are both popularly attributed to Admiral Grace Hopper in the 1940s,[1] but the term "bug" dates back at least to 1878 and Thomas Edison (see the Software bug article for a full discussion), and "debugging" seems to have been used as a term in aeronautics before entering the world of computers. Rear Admiral Grace Murray Hopper ( December 9 1906 – January 1 1992) was an American Computer scientist and United A software bug (or just “bug” is an error flaw mistake Failure, fault or “undocumented feature” in a Computer program that prevents it
The Oxford English Dictionary entry for "debug" quotes the term "debugging" used in reference to airplane engine testing in a 1945 article in the Journal of the Royal Aeronautical Society, Hopper's bug was found 9 September 1945. The Oxford English Dictionary ( OED) published by the Oxford University Press (OUP is a comprehensive Dictionary of the English A software bug (or just “bug” is an error flaw mistake Failure, fault or “undocumented feature” in a Computer program that prevents it The term was not adopted by computer programmers until the early 1950s. The seminal article by Gill [2] in 1951 is the earliest in-depth discussion of programming errors, but it does not use the term "bug" or "debugging". In the ACM's digital library, the term "debugging" is first used in three papers from 1952 ACM National Meetings. The Association for Computing Machinery, or ACM, was founded in 1947 as the world's first scientific and educational Computing society [3][4][5] Two of the three use the term in quotation marks. By 1963, "debugging" was a common enough term to be mentioned in passing without explanation on page 1 of the CTSS manual. [6]
Kidwell's article Stalking the Elusive Computer Bug[7] discusses the etymology of "bug" and "debug" in greater detail.
Debugging is, in general, a cumbersome and tiring task. The debugging skill of the programmer is probably the biggest factor in the ability to debug a problem, but the difficulty of software debugging varies greatly with the programming language used and the available tools, such as debuggers. A programming language is an Artificial language that can be used to write programs which control the behavior of a machine particularly a Computer. A debugger is a Computer program that is used to test and Debug other programs Debuggers are software tools which enable the programmer to monitor the execution of a program, stop it, re-start it, set breakpoints, change values in memory and even, in some cases, go back in time. A programmer is someone who writes Computer software. The term computer programmer can refer to a specialist in one area of computer programming or to a generalist Execution in computer and Software engineering is the process by which a Computer or Virtual computer carries out the instructions A breakpoint, in Software development, is an intentional stopping or pausing place in a program, put in place for Debugging purposes The term debugger can also refer to the person who is doing the debugging.
Generally, high-level programming languages, such as Java, make debugging easier, because they have features such as exception handling that make real sources of erratic behaviour easier to spot. In computing a high-level programming language is a Programming language with strong abstraction from the details of the computer Exception handling is a programming language construct or computer hardware mechanism designed to handle the occurrence of a condition that changes the normal flow of execution In lower-level programming languages such as C or assembly, bugs may cause silent problems such as memory corruption, and it is often difficult to see where the initial problem happened. tags please moot on the talk page first! --> In Computing, C is a general-purpose cross-platform block structured See the terminology section below for information regarding inconsistent use of the terms assembly and assembler Memory corruption happens when the contents of a Memory location are unintentionally modified due to programming errors In those cases, memory debugger tools may be needed. A memory debugger is a Programming tool for finding Memory leaks and Buffer overflows These are due to bugs related to the allocation and deallocation
In certain situations, general purpose software tools that are language specific in nature can be very useful. These take the form of static code analysis tools. This is a list of significant tools for Static code analysis. These tools look for a very specific set of known problems, some common and some rare, within the source code. All such issues detected by these tools would rarely be picked up by a compiler or interpreter, thus they are not syntax checkers, but more semantic checkers. Some tools claim to be able to detect 300+ unique problems. Both commercial and free tools exist in various languages. These tools can be extremely useful when checking very large source trees, where it is impractical to do code walkthroughs. A typical example of a problem detected would be a variable dereference that occurs before the variable is assigned a value. Another example would be to perform strong type checking when the language does not require such. Thus, they are better at locating likely errors, versus actual errors. As a result, these tools have a reputation of false positives. The old Unix lint program is an early example. In Computer programming, lint was the name originally given to a particular program that flagged suspicious and non-portable constructs (likely to be bugs in C language
For debugging electronic hardware (e. g. , computer hardware) as well as low-level software (e. Typical PC hardware A typical Personal computer consists of a case or chassis in a tower shape (desktop and the following parts Motherboard g. , BIOSes, device drivers) and firmware, instruments such as oscilloscopes, logic analyzers or in-circuit emulators (ICEs) are often used, alone or in combination. In Computing, the BIOS (ˈbaɪoʊs In computing a device driver or software driver is a Computer program allowing higher-level computer programs to interact with a Hardware device In Computing, firmware is a computer program that is Embedded in a hardware device for example a Microcontroller. An oscilloscope (commonly abbreviated to scope or O-scope) is a type of Electronic test equipment that allows signal Voltages to be viewed A logic analyzer is an electronic instrument that displays signals in a Digital circuit that are too fast to be observed and presents it to a user so that the user can more easily An in-circuit emulator (ICE is a hardware device used to debug the Software of an Embedded system. An ICE may perform many of the typical software debugger's tasks on low-level software and firmware. In Computing, firmware is a computer program that is Embedded in a hardware device for example a Microcontroller.
The debugging is started by trying to reproduce the problem. This can be a non-trivial task, for example in case of parallel processes or some unusual software bugs. Unusual software bugs are a class of Software bugs that are considered exceptionally difficult to understand and repair Also specific user environment and usage history can make it difficult to reproduce the problem.
After the bug is reproduced, the input of the program needs to be simplified to make it easier to debug. For example, a bug in a compiler can make it crash when parsing some large source file. A crash in Computing is a condition where a program (either an application or part of the Operating system) stops performing its expected function and also However, after simplification of the test case, only few lines from the original source file can be sufficient to reproduce the same crash. Such simplification can be made manually, using divide-and-conquer approach. In Computer science, divide and conquer ( D&C) is an important Algorithm design Paradigm. The programmer will try to remove some parts of original test case and check if the problem still exists. When debugging the problem in GUI, the programmer will try to skip some user interaction from the original problem description and check if remaining actions are sufficient for bug to appear. To automate test case simplification, delta debugging methods can be used. Delta Debugging automates the scientific method of Debugging. [8]
After the test case is sufficiently simplified, a programmer can use debugger to examine program states (values of variables, call stack) and track down the origin of the problem. A debugger is a Computer program that is used to test and Debug other programs In Computer science, a call stack is a dynamic stack data structure which stores information about the active Subroutines of a Computer program Alternatively a tracing can be used. In Software engineering, tracing is a specialized use of logging to record information about a program's execution In simple case the tracing is just a few print statements, which print out the values of variables in certain points of program execution.
Remote debugging is the process of debugging a program running on a system different than the debugger. To start remote debugging, debugger connects to a remote system over a network. Once connected, debugger can control the execution of the program on the remote system and retrieve information about its state.