levo

Software Engineering and Program Construction

Debugging tools: breakpoints, stepping and watches

  • 3 things to know
  • AS Unit 1
Start revising · £5/month

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.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

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

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

Fetch, , execute.
decodecompilestore

Blank Blitz consolidates the facts

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

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

A bit is a single binary digit.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

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.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.