Debugging is a process of finding and reducing the number of bugs, or defects, in a program. A defect typically is detected because the program generates unexpected behaviour. In order to locate the cause of a defect, it therefore is essential to explain why this behaviour is generated. In this paper, we propose a new debugging approach for agent-oriented programming that exploits the structure and basic concepts that are used in logic-based agent programs for providing answers to some of such why questions. Our approach is based on the fact that the behaviour of an agent-oriented program can be traced back to basically two sources. First, agents derive their choice of action from their beliefs and goals-two fundamental programming concepts in agent-oriented programming. These folk psychological concepts provide reasons for doing something. Second, agent programs are rule-based programs and the evaluation of rules to a large extent determines the program's behaviour.