# Debugger

> A tool that stops a program mid-run. You look inside and step through it.

**Field:** Software Development  
**Category:** Editors & Tools

## Think of it like

Think of it like a video you can pause. You stop at any moment and look closely at what is going on.

## Definition

A debugger is a tool that lets you run a program one step at a time. You can pause it at a chosen line and look at every variable's value. Then you step forward line by line and watch how the values change. This shows exactly where the program goes wrong. Most IDEs and code editors have one built in.

## Example

Emma pauses her app just before the total is worked out. She sees price is 0, not 10, and finds the bug on the line above.

## Example code

```console
$ python3 app.py
> app.py(2)<module>()
-> breakpoint()
(Pdb) p price
10
```

The program stops, and p prints the value of price.

## Why it matters

Guessing what code does is slow. A debugger shows you what it really does, line by line.

## Common mistake

Only ever adding print lines. They work, but a debugger shows each value and leaves the code alone.

## Three principles

- **Pause anywhere.** Stop the program at a chosen line.
- **Look inside.** See every variable's current value.
- **Step through.** Move one line at a time.

## Related terms

- [Breakpoint](https://learn.benibix.com/term/development/breakpoint)
- [Debugging](https://learn.benibix.com/term/development/debugging)
- [Integrated Development Environment (IDE)](https://learn.benibix.com/term/development/ide)
- [Bug](https://learn.benibix.com/term/development/bug)
- [Browser DevTools](https://learn.benibix.com/term/development/browser-devtools)
- [Print Debugging](https://learn.benibix.com/term/development/print-debugging)

## Taught in

- [Debuggers and Breakpoints](https://learn.benibix.com/learn/development-tools/debuggers-and-breakpoints): Coding Tools, 5/13

---

Source: https://learn.benibix.com/term/development/debugger
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
