🤖 AI Summary
This study investigates cognitive difficulties and behavioral patterns in middle school students’ Python debugging to inform evidence-based debugging instruction. Analyzing fine-grained interaction logs from 73 students using an online code editor, we employed qualitative content analysis and inductive coding to identify prevalent inefficient strategies—such as random code modification and error-introducing edits—and their underlying causes. Introducing the novel theoretical lens of “fragile knowledge,” we reveal a critical cognitive gap: students often possess adequate error-localization ability but lack systematic error-remediation competence. Results indicate that debugging failure stems not from syntactic misconceptions, but from deficits in debugging metacognition and strategic repertoire. The findings advocate for integrating structured debugging pedagogy into compulsory computing education and provide empirical grounding and actionable pathways for designing debugging instruction aligned with computational thinking development. (149 words)
📝 Abstract
Background and context: Debugging is a common and often frustrating challenge for beginner programmers. Understanding students' debugging processes can help us identify the difficulties and misunderstandings they possess. However, we currently have limited knowledge of how secondary students debug in a text-based language, a medium through which millions of students will learn to program in the future. Objectives: In this paper, we investigate the debugging behaviour of K-12 students learning a text-based programming language, as part of an effort to shape how to effectively teach debugging to these students. Method: We collected log data from 73 students attempting a set of debugging exercises using an online code editor. We inductively analysed these logs using qualitative content analysis, generating a categorisation of the debugging behaviours observed. Findings: A range of behaviours were exhibited by students, skewed towards being ineffective. Most students were able to partially locate errors but often struggled to resolve them, sometimes introducing additional errors in the process. We argue that students struggling to debug possess fragile knowledge, a lens through which we view the results. Implications: This paper highlights some of the difficulties K-12 learners have when debugging in a text-based programming language. We argue, like much related work, that effective debugging strategies should be explicitly taught, while ineffective strategies should be discouraged.