← VCE Applied Computing U1O2

Breakpoints in an editor

A marker set on a line of code that pauses the program there when it runs, so you can inspect variables and step through. Set one by clicking beside the line; click again to remove it.

Understanding Breakpoints in an editor in VCE Applied Computing U1O2

What it does: Starting the debugger runs the program until it reaches a breakpoint, then pauses so you can look at the variables. Most editors let you click beside the line number to place a breakpoint, often shown as a red dot. You do not add any code. Clicking the marker again toggles the breakpoint off. The code stays unchanged. Pausing just before the suspect line lets you inspect the variables and find where things go wrong. Breakpoints do not speed up a program. A breakpoint on a comment or blank line is skipped, and a normal run ignores breakpoints, so no pause happens.

Common mistakes: breakpoint is a function, so it needs brackets to be called. Without them nothing pauses. It should be breakpoint(). Python is case sensitive, so Breakpoint() is not defined and causes a NameError. It should be breakpoint() in lowercase.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 89–124) and word search (Modules 8–124).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
What does a breakpoint do when the program runs?
It deletes that line from the programIt pauses the program on that line so you can inspect it
Matches
Set a breakpoint on a blank line or comment, then run the program normally (not in debug mode)
↓
The program will not pause. Breakpoints only work when the program is run in debug mode and sit on a line of code that runs.
Applying
Meanings
Term
breakpoint
Meaning
A marker set on a line of code that pauses the program there when it runs, so you can inspect variables and step through. Set one by clicking beside the line; click again to remove it.
Practice
total = 0
Testing
Gaps
()
Check Answer
Spots
1total = 0
2breakpoint

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Desert Jerboa' badge — High Jumper, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. What does a breakpoint do when the program runs?
A. It pauses the program on that line so you can inspect it ✓
B. It deletes that line from the program
A breakpoint is a marker that pauses the program at a chosen line. The line is not removed or skipped.
2. How do you usually set a breakpoint in a code editor?
A. Click in the margin beside the line number ✓
B. Type the word breakpoint at the end of the line
Most editors let you click beside the line number to place a breakpoint, often shown as a red dot. You do not add any code.
3. A breakpoint is on line 6. You run the program in debug mode. What happens?
A. It pauses before line 1 and never runs the rest
B. It runs normally until it reaches line 6, then pauses ✓
The program runs up to the breakpoint and then pauses there. Lines before it have already run.
4. When the program is paused at a breakpoint, has the breakpoint line already run?
A. No, it is about to run ✓
B. Yes, it has just finished running
The program pauses before the breakpoint line runs. Variables show values from the lines before it.
5. How do you remove a breakpoint you no longer need?
A. Delete the whole program and start again
B. Click the breakpoint marker again ✓
Clicking the marker again toggles the breakpoint off. The code stays unchanged.

Match the Pairs

breakpoint → A marker on a line that pauses the program there when it runs, so you can inspect variables
Click beside line 5 in the editor → Sets a breakpoint on line 5 so the program will pause there
Running in debug mode makes the program stop at the breakpoint before the marked line runs → Run > Start Debugging (F5)
Removing a breakpoint by clicking the red dot again so the program no longer pauses there → Click the red dot beside line 5 again
Set a breakpoint on a blank line or comment, then run the program normally (not in debug mode) → The program will not pause. Breakpoints only work when the program is run in debug mode and sit on a line of code that runs.
Breakpoint set on line 10 but the bug happens on line 4 → The program pauses after the bug has already happened. Set the breakpoint on or just before the suspect line, such as line 4.

Key Term

breakpoint
A marker set on a line of code that pauses the program there when it runs, so you can inspect variables and step through. Set one by clicking beside the line; click again to remove it.

Fill in the Blanks

1. total = 0 breakpoint() print(total)
Hint: Type the built-in function name that pauses the program on that line so you can inspect it.
2. # Click beside a line to set a breakpoint print("Hi")
Hint: Type the name of the marker you set beside a line to pause the program there.
3. age = 16 breakpoint() print(age)
Hint: Type the variable created on line 1 that you would inspect while paused.
4. # The program pauses at the breakpoint x = 5
Hint: Type the verb for what the program does when it runs to a breakpoint.
5. # Click the red dot again to remove it print("Done")
Hint: Type the action verb for taking a breakpoint off a line.

Spot the Error

Question 1
A total = 0
B breakpoint
C for n in [2, 4, 6]:
D total += n
E print(total)
Line B — breakpoint is a function, so it needs brackets to be called. Without them nothing pauses. It should be breakpoint().
Question 2
A price = 20
B qty = 3
C total = price * qty
D Breakpoint()
E print(total)
Line D — Python is case sensitive, so Breakpoint() is not defined and causes a NameError. It should be breakpoint() in lowercase.
Question 3
A def area(w, h):
B result = w * h
C pause()
D return result
Line C — pause() is not a Python function, so it would cause a NameError. The line that pauses the program so you can inspect result is breakpoint().
Question 4
A count = 0
B while count < 3:
C breakpoint():
D count += 1
Line C — A function call does not end with a colon, so this is a syntax error. It should be breakpoint() with no colon.
Question 5
A x = 8
B y = x + 2
C breakpoint()
D brakepoint()
Line D — The name is misspelled, so Python raises a NameError and the program does not pause. It should be breakpoint().

Student with a class code? Join your class →