What is a bug, and what is debugging?
Options
- A bug is a flaw in software; debugging is finding and fixing its cause (Correct option)
- A bug is a virus; debugging is installing an antivirus program
- A bug is an unfinished feature; debugging is deleting it
- 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.