Software Engineering
New Research Maps How Experienced Developers Actually Debug Code in the Real World
A grounded theory study reveals that seasoned programmers rely on iterative mental models and strategic information-gathering to navigate debugging in complex codebases.
Debugging remains one of software engineering's most critical yet least understood practices. A new qualitative study based on direct observation of professional developers offers fresh insights into how experienced programmers actually approach finding and fixing bugs in real-world systems.
Study Design and Scope#
Researchers conducted a grounded theory analysis by observing twelve participants—including seven professional developers and five professional live-coding streamers—as they worked through 17 distinct debugging tasks in their own codebases. This observational approach captured a wide range of debugging contexts and real-world complexity that controlled laboratory settings often miss.
How Experts Debug#
The research identifies debugging as a structured, iterative diagnostic process fundamentally shaped by how developers build and refine their understanding of a system. Rather than chaotic trial-and-error, experienced programmers employ a deliberate strategy: they construct a mental model of the codebase and use it to guide where and how they gather information.
When debugging, developers flex between two primary information-gathering tactics:
- Navigation strategies: exploring the code structure to understand relationships and dependencies
- Execution strategies: running the code and observing its behavior to identify where things go wrong
These techniques are applied through different reasoning modes—forward tracing (following code flow from a starting point) and backward tracing (working backward from symptoms to root causes)—which developers select and adjust based on their familiarity with the code, its overall complexity, and the specific nature of the problem.
Beyond the Code#
The study also reveals that expert debugging extends beyond examining source code alone. Developers systematically gather external resources—documentation, logs, test results, and domain knowledge—to build complementary evidence that reinforces their developing mental model. This multi-source approach reflects how expertise enables developers to reason more systematically across different types of information.