Game dev
Saved & recent

Breakpoint

Related terms: conditional breakpoint, watchpoint, debugger

A marker that asks a debugger to pause when execution reaches a chosen location. It lets you inspect the state immediately before the marked code runs.

A conditional breakpoint pauses only when an expression is true, such as health < 0. That is useful for a function called hundreds of times when only one unusual call matters.

Further reading
GNU Project: Breakpoints and Watchpoints
Health.ts 14 function updateHealth(health) { 15 if (health <= 0) { 16 handleDefeat(); 17 } 18 } breakpoint condition health < 0 health = 4 continue health = 0 continue health = -2 pause before line 15
The breakpoint is on line 15. Its separate condition is health below zero. Health of 4 or 0 lets execution continue, while โˆ’2 pauses before the line runs.

View in the full Game dev collection