If it gets out of hand i consider whether they are fit to talk to. If they are unfit to talk to, not up to sutta standards i don't talk to them at all or i narrow the range of communication.
"Monks, it's through his way of participating in a discussion that a person can be known as fit to talk with or unfit to talk with. If a person, when asked a question, doesn't give a categorical answer to a question deserving a categorical answer, doesn't give an analytical (qualified) answer to a question deserving an analytical answer, doesn't give a counter-question to a question deserving a counter-question, doesn't put aside a question deserving to be put aside, then — that being the case — he is a person unfit to talk with. But if a person, when asked a question, gives a categorical answer to a question deserving a categorical answer, gives an analytical answer to a question deserving an analytical answer, gives a counter-question to a question deserving a counter-question, and puts aside a question deserving to be put aside, then — that being the case — he is a person fit to talk with.
"Monks, it's through his way of participating in a discussion that a person can be known as fit to talk with or unfit to talk with. If a person, when asked a question, doesn't stand by what is possible and impossible, doesn't stand by agreed-upon assumptions, doesn't stand by teachings known to be true,[1] doesn't stand by standard procedure, then — that being the case — he is a person unfit to talk with. But if a person, when asked a question, stands by what is possible and impossible, stands by agreed-upon assumptions, stands by teachings known to be true, stands by standard procedure, then — that being the case — he is a person fit to talk with.
"Monks, it's through his way of participating in a discussion that a person can be known as fit to talk with or unfit to talk with. If a person, when asked a question, wanders from one thing to another, pulls the discussion off the topic, shows anger & aversion and sulks, then — that being the case — he is a person unfit to talk with. But if a person, when asked a question, doesn't wander from one thing to another, doesn't pull the discussion off the topic, doesn't show anger or aversion or sulk, then — that being the case — he is a person fit to talk with.
"Monks, it's through his way of participating in a discussion that a person can be known as fit to talk with or unfit to talk with. If a person, when asked a question, puts down [the questioner], crushes him, ridicules him, grasps at his little mistakes, then — that being the case — he is a person unfit to talk with. But if a person, when asked a question, doesn't put down [the questioner], doesn't crush him, doesn't ridicule him, doesn't grasp at his little mistakes, then — that being the case — he is a person fit to talk with.
"Monks, it's through his way of participating in a discussion that a person can be known as drawing near or not drawing near. One who lends ear draws near; one who doesn't lend ear doesn't draw near. Drawing near, one clearly knows one quality, comprehends one quality, abandons one quality, and realizes one quality.[2] Clearly knowing one quality, comprehending one quality, abandoning one quality, and realizing one quality, one touches right release. For that's the purpose of discussion, that's the purpose of counsel, that's the purpose of drawing near, that's the purpose of lending ear: i.e., the liberation of the mind through no clinging. https://www.accesstoinsight.org/tipitaka/an/an03/an03.067.than.html
It is my impression that some people aren't used to a formal format of discussion but do come around embracing the due process.
In general if people want to discuss something i evaluate whether they actually want to get to the bottom of it, if they are willing to have their views challenged and whether they will respect my time and the process.
These things are non negotiable. I do my best and expect others to do their best but if it's too stressful and is not yielding worthy results, then i just don't engage them.
If people appreciate talking to you and your demands are reasonable then losing access to you is a more or less of a bad outcome for them, if they realize this they might try harder. If otherwise you let people argue they are likely to just keep at it, it's my general impression.
Other aspects of this is our own behavior and the choice of topics. Some things are hard to express correctly and the timing for the expression is crucial.
It is very hard to get these things right, to make one's point step by step and in due time. Therefore one shouldn't just cut people off hastly and one should take responsibility to improve what can be improved.