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.
翻译:调试是软件工程中核心而复杂的活动。已有研究记录了调试策略与工具使用,但鲜有理论解释经验丰富的开发者如何在大型真实代码库中对缺陷进行推理。我们采用扎根理论方法开展了一项质性研究,观察了七名专业开发者和五名专业直播编码者在各自代码库中处理17项调试任务的过程,涵盖了多样化的调试情境。我们将调试理论化为一种结构化、迭代式的诊断过程,程序员通过更新系统心智模型来指导信息收集。开发者通过导航策略与执行策略的交替运用来收集信息,采用前向与后向追踪的推理模式,并根据代码库情境、复杂度和熟悉程度调整这些方法。开发者还会收集外部资源以补充基于代码的证据,其经验使他们能够系统化构建心智模型。我们提出的专业调试扎根理论揭示了该实践以人为本的维度,对工具设计和软件工程教育具有启示意义。