Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Computer programming
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Debugging=== {{main|Debugging}} [[File:First Computer Bug, 1945.jpg|thumb|The first known actual bug causing a problem in a computer was a moth, trapped inside a Harvard mainframe, recorded in a log book entry dated September 9, 1947.<ref>{{cite web| url = https://www.nationalgeographic.org/thisday/sep9/worlds-first-computer-bug| title = Photograph courtesy Naval Surface Warfare Center, Dahlgren, Virginia, from National Geographic Sept. 1947| date = July 15, 2020| access-date = November 10, 2020| archive-date = November 13, 2020| archive-url = https://web.archive.org/web/20201113163443/https://www.nationalgeographic.org/thisday/sep9/worlds-first-computer-bug/| url-status = live}}</ref> "Bug" was already a common term for a software defect when this insect was found.]] Debugging is a very important task in the software development process since having defects in a program can have significant consequences for its users. Some languages are more prone to some kinds of faults because their specification does not require compilers to perform as much checking as other languages. Use of a [[static code analysis]] tool can help detect some possible problems. Normally the first step in debugging is to attempt to reproduce the problem. This can be a non-trivial task, for example as with parallel processes or some unusual software bugs. 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 may need to be simplified to make it easier to debug. For example, when a bug in a compiler can make it crash when [[parsing]] some large source file, a simplification of the test case that results in only few lines from the original source file can be sufficient to reproduce the same crash. Trial-and-error/divide-and-conquer is needed: the programmer will try to remove some parts of the original test case and check if the problem still exists. When debugging the problem in a GUI, the programmer can try to skip some user interaction from the original problem description and check if the remaining actions are sufficient for bugs to appear. Scripting and [[breakpoint]]ing are also part of this process. Debugging is often done with [[Integrated development environment|IDE]]s. Standalone debuggers like [[GDB]] are also used, and these often provide less of a visual environment, usually using a [[command line]]. Some text editors such as [[Emacs]] allow GDB to be invoked through them, to provide a visual environment.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)