Debugging is the process of identifying a problem in code and fixing it. Debugging is an essential skill for programmers because encountering errors in code is an inevitable part of the programming process. Teaching students strategies for debugging may be challenging, but it is a critical component of learning to code. Debugging as a learning strategy not only supports stronger computer programming and computational thinking skills but also promotes problem solving and persistence in the face of challenges.
As a learning strategy, use debugging when you want students to:
As an instructional strategy, use debugging when you want to:
Advance Prep
Debugging can be taught through modeling with examples and continued practice. Since bugs may not be anticipated or planned, it is a process that is implemented when an error occurs. There is no magic bullet for debugging because errors in code can occur for a variety of reasons, and there are a variety of approaches to address different types of bugs. Teaching students how to think through the debugging process is just as important as teaching them how to address specific types of errors.
Advanced preparation for implementing debugging in your coding lessons may consist of a posted set of guidelines to help students approach a debugging scenario or deliberate lessons where students work through debugging scenarios.
When students encounter a bug in their code, encourage them to follow debugging strategies related to common programming errors, such as syntax errors, logic errors, compilation errors, arithmetic errors, runtime errors, resource errors, and interface errors.
Some general guidelines to share, model, and review with students might include:
For teachers, knowing how much scaffolding to provide when supporting students with errors is critical for keeping students engaged in the coding process. Debugging can be a frustrating process for some students, causing them to disengage, while others might thrive on the challenge of seeking out and fixing errors. Knowing your students’ frustration thresholds is important when determining whether to guide students or give the solutions to help them proceed successfully with the coding project.
Implementation
While debugging is not a culturally responsive practice, integrating it into computer science education aligns with a core component of the Kapor Center Framework for Culturally Responsive-Sustaining CS Education. The framework states that “Pedagogy and curriculum is rigorous — aligned to K-12 CS standards and high expectations are set for all students.” By including debugging in coding lessons, teachers are addressing an essential component of K-12 Computer Science standards and adding rigor to the coding process. Teaching all students how to debug equips them with the necessary skills to compete in the CS field and be successful computer programmers.
Educator may define program structure, instructor role, and clinical encounters to support the novice candidate as they move through stages of reflective practice using video (or any other technology).
Dialogue journaling improve student teacher relationships and in turn improving student behavior is a benefit to the students, teachers, community, and parents. Research shows that if a student has one ally in a building they are more likely to have a successful educational experience.
5.4 Algorithms & programming