Don’t let your own beliefs be trampled in the process. That’s the principle I live by.
Healthy discourse is always good. Keep an open mind, and you can learn many things from the other person. But there must be respect. Religion is a touchy subject, but it is highly possible to have a good debate on certain aspects without attacking each other.
If you do get attacked, walk away. You cannot change this person’s beliefs, and they cannot change yours. It’s not worth the conflict.
It is possible to agree to disagree, but both people must make this choice. You are free to believe what you will, but remember that other people also have the same right.
I just finished having a lengthy discourse with a coworker about various aspects of Christianity, and we really didn’t agree with each other (topics involved the accuracy of the Bible and gay marriage, among other things). We didn’t agree with each other, so we didn’t reach a common conclusion. There were some raised voices.
Are we still friends? Yes. Did we attack each other? No.
If only humanity could respect each other and agree to disagree, the world would be a much better place.