What is a debugger?

Quick answer: a tool to help find errors in computer programs by allowing you to execute a computer program in line by line steps while allowing you to inspect variable values.

Mark II computer

The term debugging is widely attributed to the early days of computing when computer hardware consisted of electromechanical relays with magnetic coils which attracted moths. Every so often computer engineers would have to clean all the moths out of the hardware in order to prevent the associated computing errors from occurring. See this article which describes the origin of the term in more detail.