language-icon Old Web
English
Sign In

Debugging

Debugging is the process of finding and resolving defects or problems within a computer program that prevent correct operation of computer software or a system. Debugging is the process of finding and resolving defects or problems within a computer program that prevent correct operation of computer software or a system. Debugging tactics can involve interactive debugging, control flow analysis, unit testing, integration testing, log file analysis, monitoring at the application or system level, memory dumps, and profiling. The terms 'bug' and 'debugging' are popularly attributed to Admiral Grace Hopper in the 1940s. While she was working on a Mark II computer at Harvard University, her associates discovered a moth stuck in a relay and thereby impeding operation, whereupon she remarked that they were 'debugging' the system. However, the term 'bug', in the sense of 'technical error', dates back at least to 1878 and Thomas Edison (see software bug for a full discussion). Similarly, the term 'debugging' seems to have been used as a term in aeronautics before entering the world of computers. Indeed, in an interview Grace Hopper remarked that she was not coining the term. The moth fit the already existing terminology, so it was saved. A letter from J. Robert Oppenheimer (director of the WWII atomic bomb 'Manhattan' project at Los Alamos, NM) used the term in a letter to Dr. Ernest Lawrence at UC Berkeley, dated October 27, 1944, regarding the recruitment of additional technical staff. 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. An article in 'Airforce' (June 1945 p. 50) also refers to debugging, this time of aircraft cameras. Hopper's bug was found on September 9, 1947. The term was not adopted by computer programmers until the early 1950s.The seminal article by Gill 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. 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. Kidwell's article Stalking the Elusive Computer Bug discusses the etymology of 'bug' and 'debug' in greater detail. As software and electronic systems have become generally more complex, the various common debugging techniques have expanded with more methods to detect anomalies, assess impact, and schedule software patches or full updates to a system. The words 'anomaly' and 'discrepancy' can be used, as being more neutral terms, to avoid the words 'error' and 'defect' or 'bug' where there might be an implication that all so-called errors, defects or bugs must be fixed (at all costs). Instead, an impact assessment can be made to determine if changes to remove an anomaly (or discrepancy) would be cost-effective for the system, or perhaps a scheduled new release might render the change(s) unnecessary. Not all issues are life-critical or mission-critical in a system. Also, it is important to avoid the situation where a change might be more upsetting to users, long-term, than living with the known problem(s) (where the 'cure would be worse than the disease'). Basing decisions of the acceptability of some anomalies can avoid a culture of a 'zero-defects' mandate, where people might be tempted to deny the existence of problems so that the result would appear as zero defects. Considering the collateral issues, such as the cost-versus-benefit impact assessment, then broader debugging techniques will expand to determine the frequency of anomalies (how often the same 'bugs' occur) to help assess their impact to the overall system. Debugging ranges in complexity from fixing simple errors to performing lengthy and tiresome tasks of data collection, analysis, and scheduling updates. The debugging skill of the programmer can be a major factor in the ability to debug a problem, but the difficulty of software debugging varies greatly with the complexity of the system, and also depends, to some extent, on the programming language(s) used and the available tools, such as debuggers. Debuggers are software tools which enable the programmer to monitor the execution of a program, stop it, restart it, set breakpoints, and change values in memory. 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 and type checking that make real sources of erratic behaviour easier to spot. In 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. In those cases, memory debugger tools may be needed. 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. These tools look for a very specific set of known problems, some common and some rare, within the source code. concentrating more on the semantics (e.g. data flow) rather than the syntax, as compilers and interpreters do.

[ "Real-time computing", "Operating system", "Programming language", "Utility model", "Probe effect", "Debugger", "Boundary scan description language", "Heisenbug", "Background debug mode interface" ]
Parent Topic
Child Topic
    No Parent Topic