The most effective debugging tool is still careful thought, coupled with judiciously placed print statements.
Brian KernighanDo what you think is interesting, do something that you think is fun and worthwhile, because otherwise you won't do it well anyway.
Brian KernighanAnother effective [debugging] technique is to explain your code to someone else. This will often cause you to explain the bug to yourself. Sometimes it takes no more than a few sentences, followed by an embarrassed "Never mind, I see what's wrong. Sorry to bother you." This works remarkably well; you can even use non-programmers as listeners. One university computer center kept a teddy bear near the help desk. Students with mysterious bugs were required to explain them to the bear before they could speak to a human counselor.
Brian Kernighan