are there any philosophers who have written about this?
Yes, Greeks. Aristotle, Sextus Empiricus, John Locke, Charles Leonard Hamblin, Douglas N. Walton.
Ad hominem
The various types of "ad hominem" arguments have been known in the West since at least the ancient Greeks. Aristotle, in his work "Sophistical Refutations", detailed the fallaciousness of putting the questioner but not the argument under scrutiny. Many examples of ancient non-fallacious "ad hominem" arguments are preserved in the works of the Pyrrhonist philosopher Sextus Empiricus. In these arguments, the concepts and assumptions of the opponents are used as part of a dialectical strategy against the opponents to demonstrate the unsoundness of their own arguments and assumptions. In this way, the arguments are to the person ("ad hominem"), but without attacking the properties of the individuals making the arguments. This kind of argument is also known as "argument from commitment".
Italian polymath Galileo Galilei and British philosopher John Locke also examined the argument from commitment, a form of the "ad hominem" argument, meaning examining an argument on the basis of whether it 
what is the fallacy of the argumentum ad hominem That it is not always fallacious, and that in some instances, questions of personal conduct, character, motives, etc., are legitimate and relevant to the issue, as when it directly involves hypocrisy, or actions contradicting the subject's words. what does that last phrase mentioned above mean? It is an argumentum(a quarrel; altercation) ad hominem, refers to several types of arguments, not all are fallacious. where does this phrase come from? The ancient Greek.
wiki:1609421
Ad hominem [SEP] History
The various types of "ad hominem" arguments have been known in the West since at least the ancient Greeks. Aristotle, in his work "Sophistical Refutations", detailed the fallaciousness of putting the questioner but not the argument under scrutiny. Many examples of ancient non-fallacious "ad hominem" arguments are preserved in the works of the Pyrrhonist philosopher Sextus Empiricus. In these arguments, the concepts and assumptions of the opponents are used as part of a dialectical strategy against the opponents to demonstrate the unsoundness of their own arguments and assumptions. In this way, the arguments are to the person ("ad hominem"), but without attacking the properties of the individuals making the arguments.