This is a tough one. Often times people don't mean disrespect when they say things, often times people will say they don't mean disrespect when they actually do. The key with disrespect is a general pattern of behaviour. Someone who is disrespectful may not engage in fallacious reasoning, but rather show disrespect at various opportunities. If someone keeps calling you an idiot for example, you might feel like you can just carry on with the discussion because it doesn't harm you, but there are other good reasons to end discussions besides having your feelings hurt by someone who does not show you respect.
When someone shows a pattern of disrespect they are probably not open to listening to what you have to say. I think it is rare enough that someone who is disrespectful will take your ideas seriously that discussion with such a person is a total waste of time. After all, who takes what an idiot says seriously. If someone thinks you are an idiot and does not demonstrate any willingness to shift that position then much of what you are saying will likely be discarded. You probably know this already, but sometimes we cling to discussions where people are disrespectful because we are getting defensive.
When someone disrespects me there is an automatic thought process I have that if I reason with the person and show them that I am not what they think I am they will come around and say "yeah you weren't an idiot after all. You proved me wrong. I apologize.". Even though this is possible, I highly doubt that it is common. It's never happened to me at least.
As with anger, I think it is worth a try to salvage the discussion by pointing out the disrespect. Let that person know that they are welcome to disagree with you, but being disrespectful will result in the discussion ending. Some people are very passionate, and upon realising their overzealous behaviour might change their tune. However sometimes people are very deliberate in their disrespect. By constantly biting at your ankles they get a rise out of you and that gives them something they want. I am not sure what, but it seems that some people revel in making others angry or defensive. It can also be a sign of a dirty tactic to get you on a back foot defending yourself instead of discussing the actual topics. These kinds of tactics can be used in debates, but they are also pervasive in informal discussions with people who seem to think they are valuable tools.
Discussions are not usually about an audience, but you have to realise that someone who employs jibes may appeal to people who like to take sides. If people use disrespect it results in anger and polarisation, and once you have two distinct sides fighting there really is not much more value to be extracted from the discussion.
Finally, if you feel that you are losing respect for someone and treating them disrespectfully, it may be a good time to end a discussion. Respect goes both ways. If you feel that you cannot treat someone with respect it is also likely that you cannot take what that person says seriously. It is also likely that they will detect the disrespect and discard everything you have to say. I think that if you are unable to do the best possible job at changing someone's mind if they have a bad idea, you are morally obliged to excuse yourself.
We need to model discussions after the kind of discourse we would like to see. If we start by holding ourselves to high standards and refusing to engage in mud fights our example will lead others to do the same. If you are an interesting person to talk to, someone who may have been disrespectful might come back with a nicer attitude, because they really want to discuss something you said somewhere. I like to think of respect as a fee that people pay to enter the discussion, and the best discussions I've read and taken part in are what they are because of respect.