Chapter 4: Reading and debugging

Breakpoint

A mark on a line that tells the debugger to pause there, so the program can run at full speed up to the part you care about. A conditional breakpoint only pauses when a test you wrote is true.

You can't press Step sixty thousand times. A condition such as price < 0 makes the machine do the searching. Working out what would only be true at the moment things go wrong is most of the skill, and that same question makes your instructions to an agent sharper.

Say it to your agent

“I paused at line 88 and order.total is already wrong there, but the inputs were right at line 40. Read lines 40 to 88 and list every place that changes total.”

The workshop

Name a word, or describe what you mean in everyday language.