Press Select + Start at the Capcom screen before the logo disappears. For the PAL version of the game, hold Select and power on the SNES. The debug mode screen will appear after the Capcom logo.
Finding Hidden Rooms
A closed door could indicate a hidden room. Throw someone at the door to break it open. It could contain items or be a shortcut.