levo

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.

Your recallNot started
Key term

Explain how a conditional breakpoint helps when a loop runs thousands of times.

Key term

How would single stepping reveal a loop that repeats one time too many?

Key term

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. 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. 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. 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. 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. 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. 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.

1Closed book
2Open book
3Closed book

The 3-step method, run for you

Answer cold, learn it, then prove it stuck. Levo tracks the jump between your first attempt and your last.

Hardware: Architecture, Memory and Storage
Networks and Data Transmission
Logic Gates and Boolean Algebra
Data Representation and Data Types

Cram a whole paper in one sitting

Sort every topic into what you know and what you do not, then drill only the weak ones.

Fetch, , execute.
decodecompilestore

Blank Blitz makes facts automatic

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

AEncryption is reversible.
BThe stored form could be decrypted.
CA hash cannot be reversed.

Build It gets the exam shape right

Assemble a full-mark answer from its marking points, in the order an examiner wants them.

A bit is a single binary digit.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The traps are the mistakes students actually make.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

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.