An Investigation Into Secondary School Students’ Debugging Behaviour in Python CCS: Social and professional topics K-12 education

Laurie Gale, Sue Sentance · 2025

Read An Investigation Into Secondary School Students’ Debugging Behaviour in Python CCS: Social and professional topics K-12 education by Laurie Gale, Sue Sentance (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2508-14833.txt.

Introduction

Laurie Gale and Sue Sentance watched in 2025 how school students aged twelve to fourteen debug Python code. Fixing errors frustrates beginners, and little was known about what young students actually do in a text language. The pair collected snapshots of seventy-three students' work on set debugging tasks in an online editor.

Sorting every change students made built a fine-grained picture of their moves. Many moves were unhelpful: small edits added new errors, and students often undid good fixes. The catalog of habits gives teachers concrete behaviors to coach, from reading errors first to changing one thing at a time.

Catalog record

CREATORLaurie Gale, Sue Sentance
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE85 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2508-14833

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

An Investigation Into Secondary School Students’ Debugging Behaviour in Python CCS: Social and professional topics K-12 education Laurie Gale, Sue Sentance 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. 1. Introduction Debugging, the process of locating and resolving errors, is a vital skill within programming. Encountering errors cannot be avoided when programming; even professional software engineers reportedly spend a significant portion of their time debugging ( Britton et al. 2020 ; Perscheid et al. 2017 ) . Proficiency in debugging reduces difficulties with learning to program for novices, with some studies suggesting that ‘good debuggers’ are usually good programmers, but not always the other way around ( Ahmadzadeh et al. 2005 ; Fitzgerald et al. 2008 ) . Learning a text-based programming language (TBPL) at a secondary level is mandated in several national and statewide curricula (e.g., ( Department for Education 2013 ; Sysło 2020 ; British Columbia Ministry of Education 2016 ; Ripani and Vazquez-Brust 2023 ) ), with this number likely to increase over time. While this inclusion exposes students to traditional programming languages, debugging is a common source of struggle and emotional discomfort among students. Some students have trouble locating errors ( Ahmadzadeh et al. 2005 ; Liu et al. 2017 ) and often use ineffective debugging strategies which cause errors to persist in their programs ( Murphy et al. 2008 ; Liu et al. 2017 ; Yan et al. 2021 ) . Struggling to solve errors can quickly become emotionally aggravating ( Gorson et al. 2022 ) , which may be more true for younger learners. If these struggles come at the beginning of a student’s journey of learning to program, they will likely tarnish one’s attitudes towards programming ( Bandura 1978 ; Lishinski and Yadav 2019 ) , which may negatively influence their enjoyment of computing. Although some studies investigate the debugging patterns used by novices, these tend to focus on undergraduate students ( Murphy et al. 2008 ; Alqadi and Maletic 2017 ; Katz and Anderson 1987 ; Whalley et al. 2023 ) . Furthermore, studies at a secondary level tend not to use TBPLs ( Liu et al. 2017 ; Yan et al. 2021 ; Parkinson et al. 2024 ) , which provide a larger scope for errors. It is therefore important to investigate the behaviours exhibited by secondary learners debugging text-based programs, who may differ in the complexity of the programs they write and the methods they use to debug. Awareness of such strategies will help in improving them, in turn contributing to improving students’ programming ability and self-efficacy. This paper reports on the debugging behaviours observed among lower secondary students (aged 12-14 years old) learning to program in Python. Students were given erroneous Python programs that they attempted to debug in an online code editor. Logs of students’ code were collected every time they ran their programs. Qualitative content analysis was used to identify students’ common behaviours when debugging. The research question for this study is: • What behaviours are exhibited by secondary school students when debugging erroneous text-based programs? The behaviours that emerge from this study can be used to inform educators of common approaches that secondary students may take to try and solve errors in their programs, which is important given the rise of text-based programming in secondary schools. Researchers and educators may also use our results as a basis for developing methods that encourage positive debugging behaviours. 2. Novice Debugging Debugging can be conceptualised as a four-step process, comprising of evaluating the program, identifying the error in question, locating it, and finally resolving it ( Carver and Klahr 1986 ; Li et al. 2019 ; Carver and Risinger 1987 ) . For experienced programmers debugging other’s code, whose programming comprehension ability is superior to novices ( Gugerty and Olson 1986 ; Fix et al. 1993 ) , program evaluation is a vital first step ( McCauley et al. 2008 ) . Software engineering studies have reported an interesting range of debugging behaviours among professional developers. The use of the debugger, a program designed to closely examine program state and facilitate successful debugging, is popular. Specialist tools such as line breakpoints, step-by-step execution, and variable inspection are most frequently used ( Perscheid et al. 2017 ; Hirsch and Hofer 2021 ; Beller et al. 2018 ) . On the other hand, ‘printf debugging’ is almost as widespread a debugging technique ( Perscheid et al. 2017 ; Hirsch and Hofer 2021 ; Beller et al. 2018 ) . Beginner programmers tend to debug rather differently from their more experienced counterparts, partly due to the nature of the errors they are debugging. Many studies document the common errors encountered by novice programmers ( Altadmri and Brown 2015 ; Pea 1986 ; Spohrer and Soloway 1986 ; Denny et al. 2012 ) . These indicate that misunderstandings about program execution tend to account for most repeatedly occurring errors in students’ programs. While ‘slips of the hand’ are common, they are more easily fixed ( Altadmri and Brown 2015 ) . More recent K-12 studies echo the idea that a few common mistakes account for most errors students make ( Qian et al. 2019 ; Qian and Lehman 2020 ; Staub and Chothia 2022 ) . In addition to understanding the common errors students encounter, it is important to understand how they go about resolving them. Several studies have investigated the debugging behaviour of K-12 students, or students using a TBPL, using a range of methods. 2.1. Undergraduate Debugging Behaviour Success with debugging has been documented in several studies, reporting high rates of finding and fixing errors in students’ own programs ( Katz and Anderson 1987 ) and debugging exercises ( Alqadi and Maletic 2017 ; Fitzgerald et al. 2008 ) . From researchers’ observations and logs, some students were found to employ effective debugging strategies, including hand-tracing code ( Katz and Anderson 1987 ; Fitzgerald et al. 2008 ) and using external tools

Read the complete text