Skip to content
ballmüllersolutions logo Send an email Call us
November 27, 2026

Bug

A bug is an error in software: the program behaves differently from how it should. Bugs are found by tests, code reviews, and the debugger; good error messages and logs help with the search.

A bug is an error in software: the program behaves differently from how it should, for example because a value is calculated wrongly, a special case is missing, or an assumption does not hold. Fixing it is called debugging.

Where bugs come from

The cause rarely lies where the error shows. Common ones are:

Finding bugs: the debugger

The debugger stops a running program so that you can look at its state. Following Microsoft's guide, you set a breakpoint in the code, start with F5, and then see the values of variables and the call stack. The breakpoint pauses before the marked line. Conditional breakpoints only stop when an expression is true or a hit count is reached, such as String.IsNullOrEmpty(name). That saves time in loops. The debugger does not replace thinking, but it replaces guessing.

Preventing bugs and finding them again

Common misconceptions

In the course

You already learn debugging in K1, module 1.6, lesson Debugging: finding bugs instead of guessing. How a web API reports errors honestly is shown in K2, module 2.3, lesson Errors as ProblemDetails. Tests that catch errors early start in K1, module 1.8, with Why tests.

Further reading on the blog

Sources