Repaso
EspaƱol
Design & PracticesFoundationsDP-60

What is a bug, and what is debugging?

Options

  1. A bug is a flaw in software; debugging is finding and fixing its cause (Correct option)
  2. A bug is a virus; debugging is installing an antivirus program
  3. A bug is an unfinished feature; debugging is deleting it
  4. A bug is a test; debugging is the act of writing that test

Answer

A bug is a flaw that makes software behave wrongly; debugging is finding and fixing its cause

Why

A bug is an error in the code, design or configuration that produces a wrong or unexpected result.

Debugging is the process: reproduce the problem, find where the real behavior differs from the expected one, fix the cause, and add a test so it does not come back.

Tools: logs, print statements, and the debugger in an IDE where you can pause the program and look at variables.

Remember

Bug = flaw. Debugging = find and fix it.

Key terms

Practice this question in Repaso