The Tamagotchi V4 is known to have many glitches. If you use the search function on TamaTalk you can find many posts about it :)
As for debugging, I don’t see how it would fix glitches but a guide on how to do it can be found here. Just to note, only US/North American versions (connections)...