Debug Mode is a tool used by the game developers to test objects in the game. The majority of Sonic games on the Genesis have this code left in, though it is of no real use to the average player.
The Score in Debug Mode shows data about where Sonic is on the screen, and the Time shows how many sprites are on screen at once- helpful for developers at the time as the Genesis hardware could only process 80 sprites at a time.
A similar mode to this is Night Mode, where certain graphic planes are emphasised. This is to show level designers what Sonic can and can't run on or through.
Related Threadsis there a debug mode in sonic advance - last post by @ Jul 16, 2002
debug mode in s3k - last post by @ May 11, 2005
PLEASE A LITTLE DEBUG MODE HELP - last post by Key zer @ May 22, 2005
Alternate debug mode + Level select - last post by @ Apr 29, 2008
HELP in debug mode - last post by @ Jan 12, 2008