I am less familiar with gamecube/wii debugging than I might like to be giving specific advice. At one point dolphin was quite reasonable as a debugger, and there are some hardware options (see USB gecko), but it variously gains and loses them in the general builds so you might end up having to find an old version, and I don't know if it is still in house or you will need to set up something like GDB (
https://wrongbaud.github.io/posts/ghidra-debugger/ is for the GBA but the general idea applies, there are other things that speak to GDB, including the main gnu debugger that something like devkitpro/devkitppc might come with). You may also benefit from poking around tool assisted speedrun forums as manipulating code/understanding code is kind of a big deal there and they tend to make/fork emulators to play to that.
My general intro to debugging is from an old GBA emulator that was more command line based than the graphical stuff people go in for today (for the GBA I would suggest the link above or no$gba debug) but
https://www.romhacking.net/documents/361/ covers the general mindset.
Generally though debugging works by things called breakpoints, though you will also tend to have watchpoints/logpoints that note things in a big list.
In standard computer security models there are three things you can do
Read
Write
Execute code (some more security minded setups caring a lot about this to stop people say opening a document and having code in memory from that to run).
This gives you break on read, break on write, break on execute. BPR, BPW and BOE/BPE/some variations depending being the short form of those that many emulators will use.
As controllers tend to be in fixed locations in hardware (tends to make life easier after all) then you will be able to find something that reads it quickly enough, might be different in game. As the read or commands immediately after will also have to include a destination for the debounced section to go to then you have the second part of the equation. All far easier than a lot of more general debugging sessions where things are unknown until you make a cheat or something to source the location. Forgot to also note you might have to do it for multiple controllers for a multiplayer.
As far as using cheats to find it (I hope you are holding the button/forcing it on after you search) then I can't say I have really have gone that way and if I want to alter controls then I have other means. Still it could work in theory as it is a memory changing event and that is cheat searching. I don't know that there will be multiple debounced locations, makes little sense for there to be but I can't rule it out. For the sake of stating the obvious though then great you have a bunch of locations active when A is pressed. What happens to those when you press (and hold) B, 1,2, start, up, down, left, right and other buttons? If they do nothing then the change is related to what happens maybe but not the buttons, if the buttons change whatever remains you have the debounced section.
For GC stuff then chapter 9 of
http://hitmen.c02.at/files/yagcd/yagcd/frames.html For Wii then probably somewhere on wiibrew, or the dolphin source code.
For the bubble thing in the other thread then I figured there would be a timer. Your cheat search should have a thing for "value changed" in it (get a better one if it does not). Get into a bubble, start the search, advance a frame if your emulator allows that (many do, including those nice ones) or just go back into the game to have it run fractionally (60 frames per second, chances are your clicks/button presses will be slow enough) and search again for changed values. Repeat until you have it. I would do changed at first -- timers can be rising and falling ones and different games do different things here. Force the timers to be basically zero if above a certain value and you have your cheat. If you get better at debugging then you have an address right at the heart of it all and then you can work on changing it such that nothing happens.