This talk will explain debugging techniques and pitfalls, for the various kinds of bugs (crashes, wrong behavior, memory leak, performance issues...), using tools such as kDebug, gdb, valgrind, callgrind, modifying Qt, using your eyes... Actual examples from KDE will be used to show the thought process and use of the tools. An important section is what to consider after the bug seems fixed: other cases affecting the same code, other bugs related to this one, other places where this might happen, how to unit-test the fix, etc. Bugfixing is fun but it can also be useful if done correctly :-)