Search Header Logo
Debugging Stratgies

Debugging Stratgies

Assessment

Presentation

Computers

9th - 12th Grade

Practice Problem

Medium

Created by

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.

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

web page not embeddable

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

1

I.

2

I. and III.

3

II and IV

4

I-IV-All

9

web page not embeddable

CodeHS

You can open this webpage in a new tab.

10

media

Debugging
Basics

11

media

12

media

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

media

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

media

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

media

The bug can be a simple fix!

Tricky bugs often have simple
sources.

The first step is just to
double-check your code!

16

media

Let’s debug a

problem together!

17

Multiple Choice

Question image

The following code contains an error. What line is it on?

1

Line 3

2

Line 4

3

Line 5

4

Line 9

1.15 Code High School Debugging Strategies

By Kevvin Hankins

Show answer

Auto Play

Slide 1 / 17

SLIDE