Computing KS2: Debugging

This short film uses computer games to explain debugging, which is the process of finding and correcting errors in computer programs.

Giving directions to get the park is also used as an example to explore the strategies needed for debugging, including checking and rechecking as you go.

This short film also looks at how bugs are often found in updated programs like computer games. The destruction of the Mariner 1 space probe is given as an example of how a small but undiscovered bug led to a huge problem.

Finally, some basic strategies for debugging are explored, including working with a team, and referring back to the original program algorithm to check the intended outcomes.

This short film is from the BBC Teach series, Cracking Computing.

Teacher Notes

A good place to start is with errors in a simple sequence of instructions given to a robot, either on screen or in real life. Once the outcome has been agreed the program can be run and any mistakes identified. The error can be rectified, the program rerun and the outcome checked again. This will model the check, test, check again process that is important for successful debugging.

Unplugged activities where pupils work in pairs to give instructions to each other for drawing an unseen character are also great for identifying where the actual outcome differs from the intended outcome, and how this happened.

Many activities and games used to watch coding have built in lessons that focus on debugging by deliberately introducing mistakes that pupils have to find and correct. Working through some of these activities as a whole class can be useful to model strategies.

Pupils should wherever possible write and debug their programs in pairs of groups, to develop their collaboration skills.

Other subjects

English: Pupils are familiar with checking their work for spelling and grammar errors and then editing and adapting their work to correct these mistakes. These experiences can be compared with checking a computer program for errors and debugging it.

PE: Pupils are often asked to learn a physical process like completing a forward roll, or dribbling a ball around cones, where there is a clear expected outcome. Photography and video can be used to capture the process and identify errors in the process. These errors can then be addressed and hopefully the outcome improved - this could be seen as a type of debugging.

Curriculum Notes

This short film is suitable for teaching:

  • KS2 computing curriculum in England
  • Technologies curriculum area at 2nd Level in Scotland
  • KS2 digital competence framework in Wales
  • KS2 using ICT cross-curricular skill in Northern Ireland

More from Cracking Computing

Algorithms
video
Computer networks
video
Creating with computing
video
Decomposition
video
Input and output
video
Logical reasoning
video
Repetition
video
Search technologies
video
Selection
video
Sequencing
video
Variables
video
Working with data
video