dialectic (n): discussion and reasoning by dialogue as a method of intellectual investigation.
This is a very famous philosophical technique. I say philosophical, but it would be more accurate to describe it as a literary technique, since it is used by philosophers for the writing of philosophy, rather than for actually doing it.
It's famous because it was used by Plato all the time in his many books, which have since become the cornerstone, or perhaps you could say, virtually the entire edifice, of Western philosophy.
Plato's main character, Socrates, disputes with a selection of rival philosophers, and invariably wins. For this he uses the so-called "Socratic technique" although it could just as aptly be called the "annoying technique." He cunningly questions his opponents, pretending to be ignorant, in order to reveal fatal flaws in their thinking.
One wonders how these people fell for it every time.
And after Socrates had begun to work his method, the opponent all too often surrendered meekly, but was then forced to go the distance.
For example, in the Republic, Glaucon, after making a fairly bright start and putting across his opinions at great length, gets reduced, in the latter two-thirds of the book, to a rather pathetic figure, whose only contribution is, "Yes, Socrates," "No, of course not, Socrates," or "Undoubtedly, Socrates." It's true that Socrates views and analysis are definitely of the killer variety, but you would hope that Glaucon could have put up a bit more of a struggle. After all, this was his one chance in history to be in the spotlight.
Of course, it's always possible that he really did exactly that, but Plato, being naturally biased towards his teacher, censored it out, after Glaucon had provided the raw material which Socrates could then rip to pieces.
Philosophy, like history, is written by the winning side.