Please enable JavaScript.
Coggle requires JavaScript to display documents.
Debugging - Coggle Diagram
Debugging
Golden rules
Understand the requirement
Make it fail
Find the test case so you can check that it is fixed
Simplify the test case
Remove unneded variables
Read the right error message
Check the plug
Discard basic cases
Separate facts from interpretation
Divide and conquer
Match the tool to the bug
One change at a time
Keep an audit trail
Get a fresh view
If you didn't fix it, it ain't fixed
Cover your bugfix with regression test
Types of errors
Build
Syntax errors
Linker errors (C)
Spurious
Usually fixing the first will remove these ones
Runtime
Logic errors
Unexpected behavior
Harder to debug
Techniques
Reactive
prints
debugger
Preemptive
Assertions
Logging
Unit test