Organize a debugging investigation

A ticket-price program produces an incorrect total for a repeatable test input. You have recorded the expected total, confirmed the source file and interpreter, and set a breakpoint immediately before the suspected assignment. Arrange the remaining actions to inspect the values before and after that assignment, then verify a source-code correction.

  1. 1.

    Restart the saved program with the same input and compare its output with the expected total.

  2. 2.

    Stop execution, correct the identified source error, and save the corrected file.

  3. 3.

    Inspect and record the current values that the suspected assignment will use.

  4. 4.

    Step Over the assignment once and compare its resulting value with the expected calculation.

  5. 5.

    Start debugging with the recorded input and pause at the breakpoint before the suspected assignment.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Development Environments Questions: