In current versions the "Debug Mode" world generation is shown when clicking the "World Type" mode, and allows you to use gamemodes other than Spectator mode in a debug world.
In 1.15.2 the behavior was:
- "Debug Mode" only appeared when you held Shift while clicking the button
- "Debug Mode" automatically changed the gamemode to Spectator and grayed out the button, preventing you from changing it
- In the "Create New World" screen, go to "More World Options..."
- Click on the "World Type" button until you get "Debug Mode"
It appears without you having to hold down Shift
- Create the world
You enter the world in Survival mode