← Latest papers
💻 computer science

A Grounded Theory of Debugging in Professional Software Engineering Practice

Through a qualitative grounded theory study of professional developers and streamers, this paper proposes that debugging is a structured, iterative diagnostic process where experienced engineers systematically update mental models of a system by alternating between navigation and execution strategies to gather evidence and resolve bugs.

Original authors: Haolin Li, Michael Coblenz

Published 2026-07-01
📖 6 min read🧠 Deep dive

Original authors: Haolin Li, Michael Coblenz

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Picture: What is this paper about?

Imagine you are a detective trying to solve a mystery. You know something is wrong (a "bug"), but you don't know where it is or why it happened. This paper studied seven professional software developers and five live-streaming coders to see exactly how they solve these mysteries in their real jobs.

The researchers wanted to know: How do experts actually find and fix bugs in huge, complicated computer programs?

They found that debugging isn't just about guessing and checking. It's a structured process where the developer builds a "mental map" of the problem, updates that map as they find clues, and tries to fix it with the least amount of effort possible.


The Detective's Workflow: Four Main Steps

The researchers discovered that professional debugging happens in four distinct stages, like a detective's case file:

  1. Reproducing the Crime: First, the developer tries to make the bug happen again on purpose. If they can't make the error appear, they can't solve it.
  2. Building the Mental Map (The Longest Part): This is where the magic happens. The developer tries to figure out why the bug is happening. They build a picture in their head of how the code is supposed to work versus how it is actually working. This step takes up about 57% of the total time.
  3. Fixing the Crime: Once they are confident in their "mental map," they write a piece of code to fix the issue.
  4. Verifying the Solution: They try to make the bug happen again to prove it's gone. If it's gone, the case is closed. If not, they go back to Step 2.

The Surprise: Most people think debugging is mostly about writing the fix. The study shows that for professionals, it's mostly about figuring out what's wrong.


The Core Strategy: "Good Enough" vs. "Perfect"

One of the most interesting findings is how developers handle their knowledge.

  • The Old Advice: Traditional textbooks often say, "Read the entire manual and understand the whole system perfectly before you start."
  • The Real World: The study found that professionals do the opposite. They use a "Knowledge Avoidance" strategy.

The Analogy: Imagine you are looking for a specific lost key in a giant, messy house.

  • The "Perfect" approach would be to clean every room, read the blueprints, and understand the history of the house before looking for the key. This takes too long.
  • The "Good Enough" approach (which the pros use) is to look in the most likely spots first. If you find the key in the kitchen, you stop. You don't need to know how the plumbing works in the basement to find the key.

Developers try to learn just enough about the code to fix the specific bug, avoiding the "never-ending effort" of understanding the entire system. They aim for a "good enough" mental map, not a perfect one.


How They Gather Clues: Navigation and Execution

To update their mental map, developers use two main tools, which they switch between like a detective switching between reading a map and walking the crime scene:

  1. Navigation (Reading the Map): They look at the code without running it. They search for files, read function names, and trace how one part connects to another.
  2. Execution (Walking the Crime Scene): They run the code. They use tools like "breakpoints" (pausing the program to take a snapshot) or "console logs" (printing out what the computer is thinking) to see what is actually happening in real-time.

The Tracing Modes:

  • Backward Tracing: Starting with the error and working backward to find the cause. (e.g., "The screen crashed, so what happened right before that?") This is common when the developer doesn't know the code well.
  • Forward Tracing: Starting with the code and predicting what will happen. (e.g., "If I click this button, the data should go here...") This is common when the developer knows the code very well.

The "External Toolkit": Not Working Alone

Developers rarely work in a vacuum. The study found they heavily rely on external resources to fill in the gaps in their mental map:

  • The "Ask a Colleague" Method: They talk to coworkers or check chat logs to see if someone else has seen this before.
  • The "Time Machine" (Version Control): They look at the history of the code (like a "rewind" button) to see who changed what and when. This helps them pinpoint exactly when the bug was introduced.
  • The "Internet & AI" Method: They use search engines (like Google) and AI tools (like Chatbots) to explain confusing code or find quick solutions.
    • Note: The study found that while AI is great for explaining small pieces of code, developers often still have to fix the actual bug manually because AI can't always handle the complex, messy reality of the whole system.

The Role of Experience

Experience acts like a shortcut.

  • Novices often have to read every line of code and test every possibility.
  • Experts use their "gut feeling" based on past cases. If they see a specific error message, they might immediately know, "Ah, this is a version mismatch," and skip the long investigation. They know where to look first, saving them hours of time.

Summary

This paper tells us that professional debugging is less about being a "code wizard" who knows everything, and more about being a strategic detective.

  1. They build a mental map of the problem.
  2. They update that map by switching between reading code and running it.
  3. They use backward and forward thinking depending on how well they know the system.
  4. They rely on outside help (colleagues, history, AI) to save time.
  5. They aim for a "good enough" solution to fix the bug quickly, rather than trying to understand the entire universe of the code.

The researchers suggest that tools for developers should be built to help them track these "mental maps" and manage their uncertainty, rather than just giving them a list of errors to fix.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →