debugging

Finding and fixing the cause of a bug, by observing what the program actually does and comparing it with what it should do.

In more detail

Good debugging starts from a hypothesis about the cause and tests it, instead of changing code at random. Tools range from adding temporary print calls to stepping through code in a debugger; a test that reproduces the bug keeps it from coming back.

Example

print(f"{total=}") prints both the name and value of total while debugging.

Related terms

Taught in

References

Certification courses