Skip to main content

Important update from TheSchoolRun

For the past 13 years, TheSchoolRun has been run by a small team of mums working from home, dedicated to providing quality educational resources to primary school parents. Unfortunately, rising supplier costs and falling revenue have made it impossible for us to continue operating, and we’ve had to make the difficult decision to close. The good news: We’ve arranged for another educational provider to take over many of our resources. These will be hosted on a new portal, where the content will be updated and expanded to support your child’s learning.

What this means for subscribers:

  • Your subscription is still active, and for now, you can keep using the website as normal — just log in with your usual details to access all our articles and resources*.
  • In a few months, all resources will move to the new portal. You’ll continue to have access there until your subscription ends. We’ll send you full details nearer the time.
  • As a thank you for your support, we’ll also be sending you 16 primary school eBooks (worth £108.84) to download and keep.

A few changes to be aware of:

  • The Learning Journey weekly email has ended, but your child’s plan will still be updated on your dashboard each Monday. Just log in to see the recommended worksheets.
  • The 11+ weekly emails have now ended. We sent you all the remaining emails in the series at the end of March — please check your inbox (and spam folder) if you haven’t seen them. You can also follow the full programme here: 11+ Learning Journey.

If you have any questions, please contact us at [email protected]. Thank you for being part of our journey it’s been a privilege to support your family’s learning.

*If you need to reset your password, it will still work as usual. Please check your spam folder if the reset email doesn’t appear in your inbox.

What is debugging?

What is debugging?
The debugging cycle in computer programming explained by TheSchoolRun's Billy Rebecchi, with details of how children are taught to debug programs in the KS1 and KS2 classroom.

What is debugging?

Debugging is when you find an issue in the program that you have written and repair it. We would normally do this by using something called a debugging cycle.

When writing a program it is very easy to make mistakes in your code. Before reading this debugging guide it is advised that you read What is a program?, which explains the steps that are taken when building a program.

How children learn about debugging in KS1

In KS1 your child will learn to debug programs using real-world examples of algorithms.

For example, your child may be given a sequence of steps to complete in order to achieve a given task, such as brushing their teeth. The algorithm that your child is given may be incorrect and they will be asked to identify the problem. Have a look at the following example of a brushing-teeth algorithm:

The algorithm defines 6 steps that are required to be run in order to complete the task of brushing your teeth. However, if you read through the steps one at a time, you will see that Step Three says to put the toothbrush in your mouth and Step Four tells you to put toothpaste on the brush – they are in the wrong order. This is an error in our algorithm and will stop us from successfully completing the task. The process of finding and correcting errors in computer programs is known as debugging.

How children learn about debugging in KS2

At KS2 the idea of debugging is built upon to include reference to writing code, however the underlying processes do not change: you find out what is wrong with your program and then you work out how to fix it.

Your child will be introduced to the debugging cycle, and whilst there is no exact definition of the steps in the debugging cycle a good example can be seen below:

As you can see in the diagram, debugging is not a one-off task. If you have a small program with limited steps, it is easy to debug. However, in the real world, programs such as Microsoft Word and websites such as Facebook are so large that it is impossible to find all the bugs in the program. It is also important to note that often by fixing a bug in a program you introduce more bugs!

Why is correcting errors in programming called debugging?

The term debugging seems a strange one to use to describe the fixing of errors in a program. Why do we call errors computer bugs in the first place? The answer harks back to the 1940s when renowned computer programmer Grace Hopper recorded the first-ever instance of a computer bug. The Harvard Mark II computer was an early electronic computer and used electronic relays to make calculations. When Grace ran her program, she consistently got incorrect results and had to try to identify the problem. Through further investigation it was discovered that a moth had flown into one of the electronic relays, short-circuiting the computer and producing incorrect results. Thus, the first ever-recorded instance of a computer bug was found! Here it is in the logbook from 1947:

Introduction to the basic concept of debugging and how it is used to fix broken algorithms.

Debugging in primary school: what your child learns year-by-year

Please note that the following guidelines for what is taught in each primary year is for guidance only and may not be representative of the way computing is taught at your child’s school.

Year 1
Introduction to the basic concept of debugging and how it is used to fix broken algorithms.

Year 2
Students will have to debug basic algorithms for everyday tasks such as brushing your teeth.

Year 3
Students may be given a program for a programmable floor robot and have to find an error in it.

Year 4
Students will be given an algorithm in a visual programming language such as Scratch and have to debug it.

Year 5 and Year 6
From Y4 onwards students should be writing their own code in a visual language such as Scratch, and debugging will mainly be fixing bugs in their own code as opposed to searching for bugs in code given to them.