A debate is a formal discussion, for example in a parliament or institution, in which people express different opinions about a particular subject and then vote on it.
If people debate a topic, they discuss it fairly formally, putting forward different views. You can also say that one person debates a topic with another person.
If you debate whether to do something or what to do, you think or talk about possible courses of action before deciding exactly what you are going to do.