debounce with seven segment and shift register not lighting correct segments.

It sounds like you didn't even have working sketch of being able to write the correct number ignoring for the moment use of the switch.