Well, I've never done it, but I've attempted. Then I always chicken out. But I know how to do it.
First, make sure that the type you have is a ConneCTion, not a ConneXion. Connexions don't have debug circles. If you have an American Connection, then read on!
First, open up your Tamagotchi as if you were going to replace the battery. DON'T take it out, though. Now, do you see those four little screws in the corners? Unscrew those. It takes a very clever screwdriver to do that.
Is the battery still in it? Good. Tape it in place. Now, do you see a little circle to the bottom left corner of the battery? It should say "Debug" on top of it. (If there is no debug circle, you probably have a Connexion or minor sight problems. It's OK, you can try again some other time.) Take a pencil and scratch that circle, which is actually two semicircles. This should make a lead between the semicircles. Turn over your Tama. It should have the Download/Reset screen on it. Select "Reset". Don't worry if you hatch an egg and choose a name. Use button A (the left one) to scroll through the characters. If it seems normal and you can't scroll through the characters or anything, then turn the Tama over AGAIN and keep scratching at the debug circle with that pencil! It should work, but beware: Debugged Tama's poop A LOT.