breakpoint
A marked place in a program where execution pauses so you can inspect it in a debugger.
In more detail
You set breakpoints in an editor by clicking beside a line, or in code with a call such as breakpoint() in Python. When execution reaches one, the debugger takes over; continuing runs on to the next breakpoint.
Example
def total(xs):
breakpoint()
return sum(xs)Related terms
- pdb — Python's built-in command-line debugger, reached with breakpoint() or python -m pdb script.py.
- debugging — Finding and fixing the cause of a bug, by observing what the program actually does and comparing it with what it should do.
- debugger — A tool that pauses a running program so you can step through it line by line and inspect its variables.
- failure report — What the test runner prints when a test fails: which test, which line, and the values that did not match.
Taught in
- Debugging: print, breakpoint, and the debugger — Hands-on Python: Complete Video Course & Book
- Making Failures Explain Themselves — Automated Testing, TDD & Quality Engineering