Table of Contents
Fetching ...

A Grounded Theory of Debugging in Professional Software Engineering Practice

Haolin Li, Michael Coblenz

TL;DR

The paper addresses the lack of a theory guiding how professionals debug in large, real-world codebases. It adopts a constructivist grounded theory and analyzes 12 developers (including five streamers) across 17 debugging tasks to produce a theory of debugging as an iterative, mental-model–driven diagnostic process. Core contributions include detailing how developers update uncertainty and speculative hypotheses, blend codebase exploration with forward and backward tracing, and rely on external resources and socio-technical collaboration to reach fixes, with implications for tool design and education. The findings offer practical guidance for designing debugging tools that support mental-model management, collaborative workflows, and AI-assisted reasoning, and for pedagogy that foreground uncertainty management in complex software systems.

Abstract

Debugging is a central yet complex activity in software engineering. Prior studies have documented debugging strategies and tool usage, but little theory explains how experienced developers reason about bugs in large, real-world codebases. We conducted a qualitative study using a grounded theory approach. We observed seven professional developers and five professional live-coding streamers working on 17 debugging tasks in their own codebases, capturing diverse contexts of debugging. We theorize debugging as a structured, iterative diagnostic process in which programmers update a mental model of the system to guide information gathering. Developers gather information by alternating between navigation and execution strategies, employing forward and backward tracing modes of reasoning and adapting these approaches according to codebase context, complexity, and familiarity. Developers also gather external resources to complement code-based evidence, with their experience enabling them to systematically construct a mental model. We contribute a grounded theory of professional debugging that surfaces the human-centered dimensions of the practice, with implications for tool design and software engineering education.

A Grounded Theory of Debugging in Professional Software Engineering Practice

TL;DR

The paper addresses the lack of a theory guiding how professionals debug in large, real-world codebases. It adopts a constructivist grounded theory and analyzes 12 developers (including five streamers) across 17 debugging tasks to produce a theory of debugging as an iterative, mental-model–driven diagnostic process. Core contributions include detailing how developers update uncertainty and speculative hypotheses, blend codebase exploration with forward and backward tracing, and rely on external resources and socio-technical collaboration to reach fixes, with implications for tool design and education. The findings offer practical guidance for designing debugging tools that support mental-model management, collaborative workflows, and AI-assisted reasoning, and for pedagogy that foreground uncertainty management in complex software systems.

Abstract

Debugging is a central yet complex activity in software engineering. Prior studies have documented debugging strategies and tool usage, but little theory explains how experienced developers reason about bugs in large, real-world codebases. We conducted a qualitative study using a grounded theory approach. We observed seven professional developers and five professional live-coding streamers working on 17 debugging tasks in their own codebases, capturing diverse contexts of debugging. We theorize debugging as a structured, iterative diagnostic process in which programmers update a mental model of the system to guide information gathering. Developers gather information by alternating between navigation and execution strategies, employing forward and backward tracing modes of reasoning and adapting these approaches according to codebase context, complexity, and familiarity. Developers also gather external resources to complement code-based evidence, with their experience enabling them to systematically construct a mental model. We contribute a grounded theory of professional debugging that surfaces the human-centered dimensions of the practice, with implications for tool design and software engineering education.
Paper Structure (39 sections, 3 figures, 5 tables)

This paper contains 39 sections, 3 figures, 5 tables.

Figures (3)

  • Figure 1: The Debugging Process Overview. Developers cycle through debugging, implementing a fix, and validating the fix. The influence of experience and version awareness guides the entire debugging process. Mental model development process is detailed in Fig. \ref{['fig:mental_model']} in Section \ref{['sec:mental_model_update']}.
  • Figure 2: Debugging Steps Over Normalized Time.
  • Figure 3: Mental Model Development Process. Developers maintain a mental model of uncertainty and speculations by gathering codebase and external information.