WJEC A-Level Computer Science 601-5345-3
Hardware: Architecture, Memory and Storage
Networks and Data Transmission
Logic Gates and Boolean Algebra
Data Representation and Data Types
Data Structures
Organisation of Data: Files and Records
Database Systems
The Operating System
Algorithms and Programs
Principles of Programming
Systems Analysis
Software Engineering and Program Construction
Types of Software System
Practical Programming
Data Security and Integrity
Computing, Society and the Law
Advanced Data Structures and Logic
Recursion, Sorting and Searching
Programming Paradigms and Translators
System Design and Human-Computer Interaction
Software Engineering Tools and Professional Practice
Advanced Architecture and Assembly Language
Communication Networks and File Organisation
Number Representation and Floating Point
Databases and Distributed Systems
Operating System Management
Software Systems and Applications
Data Security, Cryptography and Attack
Software Engineering and Program Construction
Debugging tools: breakpoints, stepping and watches
- 3 things to know
- AS Unit 1
Overview
Stepping into a subroutine call and stepping over it, why a debugger finds logic errors that the translator cannot and variable trace.
What you need to know
Answer each one before you reveal it.
How would single stepping reveal a loop that repeats one time too many?
Why is using a debugger usually better than inserting statements that print values?
Questions from this subtopic
Each one with the model answer underneath.
- 1
What is a debugger?
Model answer
It is a tool that runs a program under control so its execution can be halted, taken one statement at a time and inspected while the values inside it are examined.
- 2
What is a breakpoint?
Model answer
It is a marker placed on a line so that execution stops just before that line is carried out, letting the programmer inspect the state of the program at that exact point.
- 3
Explain how a conditional breakpoint helps when a loop runs thousands of times.
Model answer
The breakpoint is set to fire only when a stated condition holds, such as a counter reaching a particular value, so the program runs at full speed until it reaches the case that is going wrong.
- 4
What is a watch?
Model answer
It is a variable or expression the debugger displays continuously, so its value can be seen changing as each statement is carried out.
- 5
Distinguish between stepping into a subroutine call and stepping over it.
Model answer
Stepping into enters the subroutine and executes it a statement at a time; stepping over runs the whole call at full speed and stops at the next statement of the calling routine.
- 6
When would a programmer choose to step over a call rather than into it?
Model answer
When the subroutine is already known to work, so there is nothing to learn from watching it and the fault is being looked for elsewhere.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Software Engineering and Program Construction, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.