Tu quoque
Etymology
Latin "tu quoque" means "you too" or "you also." It names a special case of the ad hominem, redirecting scrutiny from the argument to the arguer’s own conduct. A hypocrite can still be right, which is exactly what the move hopes you will forget.
noun phrase · /too-KWOH-kwee/
Dismissing a criticism by pointing out that the critic is guilty of the same thing.
What it names
Spotting it stops a valid point from being neutralized by the fact that the messenger is a hypocrite.
Example
"You’re telling me to quit smoking? You smoke a pack a day" is tu quoque — the advice may be sound anyway.
Related idea
Whataboutism generalizes it, deflecting with someone else’s wrongs rather than the critic’s own.