Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

jargon
debugging

What is shotgun debugging?

Abdul Moeed Asad

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Shotgun debugging refers to the process of making directionless changes to a program in the hopes of perturbing a bug out of existence. It rarely works; however, it may help to explore the dynamics of a buggy program when used by a domain expert.

svg viewer

For example, with shotgun debugging, a programmer may be able to understand the existence of a race condition in the code. If adding or removing print statements affects the program’s working, then the program may be stuck in a race condition. This might mean that when a print statement is added to a certain operation, the operation is delayed. This delay could sequence the general set of operations in a way that might “fix” the program.

Shotgun debugging is best used in small programs sa it does not lend itself well to increasing complexity.

RELATED TAGS

jargon
debugging

CONTRIBUTOR

Abdul Moeed Asad
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring