301.18 IDE Skills
Practise exam questionsIDE Skills — Note 4 of 4
Stepping + watch tools.
IDEs offer debugging tools: breakpoints pause the program at a specific line, stepping runs one line at a time, and watch windows show variable values as the program runs.
print()# 1. Set breakpoint on suspicious line
# 2. Run in debug mode
# 3. Step through line by line
# 4. Watch variable values change
# 5. Find where the value goes wrong
total = 0
for i in range(5): # ← set breakpoint here
total += i # watch 'total' and 'i'Specification notes for programming are in Paper 2.