Shotgun debugging

Short description: Debugging style

This article is being considered for deletion in accordance with Wikipedia's deletion policy.
Please share your thoughts on the matter at this article's entry on the Articles for deletion page.

Feel free to improve the article, but the article must not be blanked, and this notice must not be removed, until the discussion is closed. For more information, particularly on merging or moving the article during the discussion, read the guide to deletion.
Find sources: "Shotgun debugging" – news · newspapers · books · scholar · JSTOR[[Wikipedia:Articles+for+deletion/Shotgun+debugging]]AFD

|

This article relies largely or entirely on a single source. Please help improve this article by introducing citations to additional sources.
Find sources: "Shotgun debugging" – news · newspapers · books · scholar · JSTOR (March 2017)

|

Shotgun debugging can be defined as:

* A process of making relatively un-directed changes to software in the hope that a bug will be resolved.[1][2]
* Using the approach of trying several possible solutions of hardware or software problem at the same time, in the hope that one of the solutions (typically source code modifications) will work.[3]

Shotgun debugging has a relatively low success rate and can be very time-consuming, except when used as an attempt to work around programming language features that one may be using improperly. When combined with domain expertise and a strong intuition for the underlying codebase, it can be a good starting point to gut-solve a buggy piece of code a few times before formally researching the corresponding error message. When used in this way, it may be a valuable technique that is faster than browsing through the Internet searching a particular error message every time.

## Examples

Shotgun debugging can occur when working with multi-threaded applications. Attempting to debug a race condition by adding debugging code to the application is likely to change the speed of one thread in relation to another and could cause the problem to disappear. This is known as a Heisenbug. Although apparently a solution to the problem, it is a fix by pure chance and anything else that changes the behavior of the threads could cause it to resurface -- for example on a computer with a different scheduler. Code added to any part of the program could easily revert the effect of the "fix".

## See also

* Shotgun surgery
* Fuzzing
* Programming by permutation

## References

1. ↑ Definitions for Shotgun debugging
2. ↑ "The Jargon File: shotgun debugging". http://catb.org/jargon/html/S/shotgun-debugging.html.
3. ↑ DEFINITION shotgun debugging Posted by: Margaret Rouse WhatIs.com

This article is based in part on the Jargon File, which is in the public domain.

0.00

(0 votes)

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Shotgun_debugging&oldid=4266492"