Game dev
Saved & recent

Debugger

Related terms: breakpoint, watch, step into, step over, call stack

A tool that lets you inspect a running program. Pause execution, examine variables and the call stack, and step through code to see where behavior diverges from what you expected.

Use a breakpoint near the suspicious code, then check the actual values. Stepping into a function follows its body; stepping over runs the call without entering it. Pausing can change timing, which matters for networking and threaded bugs.

Further reading
GNU Project: Debugging with GDB
Player.ts 21 function update() { 22 const canJump = grounded && jumpPressed; 23 if (canJump) { 24 player.vy = jumpSpeed; 25 } 26 } watch values grounded true jumpPressed false canJump false call stack update() frame() paused line resume and step
Execution pauses before the branch at line 23. Grounded is true and jumpPressed is false, so canJump is false.

View in the full Game dev collection