Debugging
Given a failure, find and fix the error. Key is reproducibility What input causes the failure?
Debugging Strategies
Goal: Find a point in your program where it behaves differently than what you expect. Work backwards to the error. assert calls Output statements within System.out.println Use a debugger.
Debugger
Set a breakpoint to pause execution. View variable values while paused. Continue execution by: Continuing to the next breakpoint Stepping to the next statement in the method Stepping into a method being called