I'm assuming you've got an American v3. Here's the steps:
1. Unscrew the back cover and remove the battery, as if you were going to change the battery.
2. Unscrew the four small screws on the four "corners."
3. If I remember correctly, the debug panel is located near the area the battery was. Rub over this area with a pencil. (It's labelled "debug.")
4. Put the back half of the shell on again (not the back cover) and replace the battery.
5. If the egg bounces up and down really fast, it's worked! If not, go back and rub more graphite on the debug panel.
6. Now, put the back cover back on and have fun experimenting with your debugged Tamagotchi!
If you wish to un-debug your Tamagotchi, follow the steps, but instead of rubbing over the debug panel with a pencil, use an eraser to get rid of all of the pencil marks.
On an Australian Tamagotchi Connexion v3, I've seen a debug panel on the other side of the circuit board (the side where the screen is). It's near the big black blob thingy. However, I haven't tried rubbing over this with a pencil yet. I'm not sure if it works.