How People Debug, Revisited: An Information Foraging Theory Perspective

Many theories of debugging have been proposed over the years, but most were formulated using very small programs, in an era of programming environments that were much simpler than today’s environments. Further, because these theories rely on complex mental constructs such as hypotheses, they offer little practical advice to builders of software engineering tools. In this paper, with a practical perspective in mind, we reconsider the notion of how people go about debugging in today’s large collections of source code using a modern programming environment. Specifically, we present an information foraging theory of debugging-focused navigation that describes behavior in terms of environmental cues. The theory treats programmer navigation relative to a bug as being analogous to an animal using scent and topology when navigating in the wild in search of prey. It further proposes that these constructs of scent and topology provide enough information to describe and predict programmers’ navigation during debugging, without reference to mental states such as hypotheses. To evaluate this premise, we used an executable model of the theory to predict ten professional programmers’ navigation of real-world open source programs while they debugged, and analyzed the results in light of what these programmers talked aloud about while they debugged. We found that the programmers’ verbalizations as they debugged were overwhelmingly about following scent, pervasively across six debugging modes, much more than their verbalizations of (non-scent) hypotheses. We also found that, although the programmers used numerous resources, source code was the artifact in which most scent processing took place, suggesting that relatively inexpensive algorithms based on static analysis of source code alone are viable in supporting programmers’ information seeking activities as they debug. In fact, scent and scent plus topology were both more effective predictors of programmers’ navigation than the programmers’ stated hypotheses, suggesting that reasoning about artifacts in the environment is not only a more practical mechanism in practice than drawing from verbalizations of mental state, it may also be more accurate. Finally, we discuss our results’ implications for ways to enhance software engineering tools according to information foraging principles.

By: Joseph Lawrance; Christopher Bogart; Margaret Burnett; Rachel Bellamy; Kyle Rector

Published in: RC24783 in 2009


This Research Report is available. This report has been submitted for publication outside of IBM and will probably be copyrighted if accepted for publication. It has been issued as a Research Report for early dissemination of its contents. In view of the transfer of copyright to the outside publisher, its distribution outside of IBM prior to publication should be limited to peer communications and specific requests. After outside publication, requests should be filled only by reprints or legally obtained copies of the article (e.g., payment of royalties). I have read and understand this notice and am a member of the scientific community outside or inside of IBM seeking a single copy only.


Questions about this service can be mailed to .