This code only works for Sonic. First, do the Level Select cheat. In the Level Select menu, go to Sound Test and hear the sounds 04, 01, 02, 06 in this order. If done correctly, you'll hear a Chao Emerald sound effect. Now, select any stage from this menu and not only you'll be able to turn into Super Sonic with 50 rings but also you'll get Sonic's second ending after beating Death Egg Zone.
Debug Mode
First enter the level select code. Now, go to sound test option, and play the following tunes-1,9,9,2,1,1,2,4 - It should make a ring sound when track 4 is played to signify you've entered it correctly, now select the stage you want to go to, and press start while holding A (3DS Y button) until the stage starts, and you'll have debug activated. Here are the controls---- B (3DS B button) -Turn Debug on/off A (3DS Y button) -Switch object C (3DS A button) -Put down object selected Pressing A (3DS Y button) while the game is paused will cause the game to reset.
Level Select Screen
At the title screen, select Options. Highlight Sound Test then play the following music and sounds: 19, 65, 09 and 17. You will hear a ring-collecting sound for correct code entry. Then press START to return to the title screen. Highlight 1-Player, hold the A Button (defaults to the Y button on 3DS) and press START. You are directed to Level Select Screen. Choose a level then press START to begin.