An Investigation Into Secondary School Students' Debugging Behaviour in Python
Laurie Gale, Sue Sentance
Abstract
Background and context: Debugging is a significant and often frustrating challenge for beginner programmers. Understanding students' debugging behaviours and strategies can help to identify common difficulties and inform approaches for alleviating these. Currently, there are limited studies of school students' debugging behaviour in a text-based programming language, a medium through which millions are learning to program. Objectives: In this paper, we investigate the debugging behaviour of 12-14-year-old students learning Python through a lesson-long classroom study. Method: We collected program snapshots from 73 students' attempts at a set of Python debugging exercises in an online code editor. Through qualitative content analysis of these snapshots, we developed a granular categorisation of the changes students made when debugging. Findings: While most students were able to resolve some errors, most also frequently exhibited ineffective debugging behaviours. Many students added errors through small-scale changes, reverted corrective changes, and repeatedly ran identical programs in quick succession. From the results, we identify four barriers to successful and reliable debugging for students learning a text-based programming language: fragile knowledge, a lack of systematicity and reflection, the syntax barrier, and dynamics of emotions and attitudes. Implications: This paper highlights some of the difficulties that secondary school students have when debugging in Python. We recommend that school teachers explicitly teach a systematic approach to debugging and discourage the use of ineffective debugging behaviours, and that programming environments should contain features that facilitate successful debugging.
