The Buddha gave a wonderful teaching on how to recognize the Dhamma, found here at Access to Insight. Worth noting: the Dhamma is to be recognized by its qualities.
The Buddha tells Mahapajapati Gotami (who, incidentally, was his foster mother and also the first Buddhist nun) what is not the Dhamma:
'These qualities lead to passion, not to dispassion;
to being fettered, not to being unfettered;
to accumulating, not to shedding;
to self-aggrandizement, not to modesty;
to discontent, not to contentment;
to entanglement, not to seclusion;
to laziness, not to aroused persistence;
to being burdensome, not to being unburdensome'
And what the Dhamma is:
'These qualities lead to dispassion, not to passion;
to being unfettered, not to being fettered;
to shedding, not to accumulating;
to modesty, not to self-aggrandizement;
to contentment, not to discontent;
to seclusion, not to entanglement;
to aroused persistence, not to laziness;
to being unburdensome, not to being burdensome':
One wonderful thing about this teaching is that it tells us these are qualities that we may know. Also: These are qualities one discovers for oneself, with regard to one's own experience. That means the Dhamma is not a yardstick by which to measure others. Nor is it a weapon to be used in debates.
This creates a context for what it means to go for refuge in the Dhamma. It is a personal experience, dependent on causes and conditions, reflecting qualities that one discerns through direct knowledge.
When I start to get caught up in the discussion, when I feel misunderstood, or when I feel slighted, or when I feel smug, for example, then I can know: This is not the Dhamma, this is not the Teacher's instruction.
And in recognizing that, I can loosen my grip, understand what is going on, recognize the habit patterns at play. And smile. And then I can know: This is the Dhamma, this is the Teacher's instruction.