
Debugging Stratgies
Presentation
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Medium
Kevvin Hankins
Used 1+ times
FREE Resource
13 Slides • 4 Questions
1
1.15 Code High School Debugging Strategies
By Kevvin Hankins
2
Standard
IT-CSP-6
Create programs that translate human intention into computational artifacts including music, images, visualizations, and more while exploring the concepts, techniques and development used in writing programs.
3
Locate and correct errors in a program.
IT-CSP-6.4
Evaluate, justify, and explain a program for correctness, i.e., program style affecting the determination of program correctness.
IT-CSP-6.3
Learning Targets
4
Debugging is fixing a problem in your code.
DeBugging
A bug is a problem in your code.
Bug
Key Vocabulary
5
Match
Match the term to the correct definition.
Bug
Debugging
IT-CSP-6.4
A problem in your code.
Fixing a problem in your
Locate and correct errors in a program.
A problem in your code.
Fixing a problem in your
Locate and correct errors in a program.
6
Open Ended
1. What are some bugs you’ve encountered in your programs?
2. How did you find the location of the bug?
3. What did you do to fix the bug? How did you know to do this?
7

CodeHS
You can open this webpage in a new tab.
8
Multiple Choice
Which of the following is an example of a ‘runtime error’?
I. Karel crashing into a wall
II. Leaving a semicolon off the end of a command
III. Using the wrong syntax in an if/else statement
IV. Not closing all open brackets
I.
I. and III.
II and IV
I-IV-All
9

CodeHS
You can open this webpage in a new tab.
10
Debugging
Basics
11
12
First Debugging Strategies
● Attention to detail
○
Even the smallest syntax error could be the source of the
problem, something as small as a typo!
● Questioning assumptions
○
Sometimes the thing we are so sure can’t be the source of
the problem actually is. Make sure to question everything.
13
Attention to Detail
● We need to get the details exactly right!
● But it is easy for things to slip by
○
Look out for typos
○
Small errors
■
Typos in variable names
■
Syntax errors in functions, if statements, loops
■
Valid code that isn’t what you meant
■
Accidental mix-ups
14
Questioning Assumptions
● The computer isn’t likely making a mistake, it is just
doing what you told it to do.
● This means we may have (and likely did!) overlook
something
○
The problem description
○
Our pre and post conditions
○
Does this actually do what I think it does?
○
What have I assumed worked that could actually be
broken?
15
The bug can be a simple fix!
Tricky bugs often have simple
sources.
The first step is just to
double-check your code!
16
Let’s debug a
problem together!
17
Multiple Choice
The following code contains an error. What line is it on?
Line 3
Line 4
Line 5
Line 9
1.15 Code High School Debugging Strategies
By Kevvin Hankins
Show answer
Auto Play
Slide 1 / 17
SLIDE
Similar Resources on Wayground
12 questions
Word Choice,: Figurative, Connotative, and Impact
Presentation
•
9th - 12th Grade
11 questions
Teenager 5 Session 22: Pronunciation & Speaking
Presentation
•
KG
11 questions
Spanish-speaking countries
Presentation
•
9th - 12th Grade
14 questions
Introduction to PowerPoint
Presentation
•
9th - 12th Grade
16 questions
Computer Science Principles Unit 2 Review
Presentation
•
9th - 12th Grade
13 questions
Part 1 Mastering Microsoft PowerPoint 2019
Presentation
•
9th - 12th Grade
13 questions
Python Basics 1
Presentation
•
8th - 12th Grade
11 questions
INTERNET 101: WIRES, CABLES & WIFI
Presentation
•
9th - 12th Grade
Popular Resources on Wayground
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade