Here's how you run doppelgangers: You don't.
But seriously, here's how you run doppelgangers:
1) DM asks everyone to make a Perception check (or Spot, or whatever edition thing you roll). He rolls his own counter-roll, with a bonus/Advantage if nobody suspects there's a doppelganger.
2) DM gets the results: if the DM loses, it just means that the winning player notices the next bit as it happens.
3) DM announces what the doppelganger did, but not who did it. Something like "A glass bottle breaks, awakening the sleeping guards" or "The Fighter's sword is not in its scabbard". If someone beat the check in Step 2, then you get this "Someone among you breaks a glass bottle, awakening the guards" or "One of you has taken the Fighter's sword". In the first circumstance, the players will be puzzled, but not likely suspicious yet. In the latter circumstance, they will become suspicious of each other and rightfully paranoid.
4) If the doppelganger loses another check, they can narrow their suspicions a bit more without outright knowing who the traitor is. The next statement (using the same scenario) would go like "A breaking bottle awakens the guards. The Ranger and Thief were both closest to the table where the bottle was a second ago" or "The Fighter's sword is missing, yet it clatters to the floor behind the Ranger's back". Because even the doppelganger-replaced character doesn't know he's the doppelganger, he'll genuinely deny it, which is exactly what a doppelganger would do, so it's authentic.
4) If the doppelganger loses three opposed checks, then the party has sensed enough to know who it is with "The Ranger breaks a glass bottle which awakens the guards" or "You see the Ranger trying to covertly steal the Fighter's sword". Then you inform the doppelganger-replaced character that they are a doppelganger, and pull them from the fight while you start combat.
The key is not telling the character that they're a doppelganger, so they do the deceiving for you without even know they are doing it (also, there's no metagaming, which is the biggest bane of doppelganger play).