From this page of the Valheim game guide, you will learn about Debug mode and Creative mode, how to enable them and how to use them.
In Valheim, players can use the command console (F5) to use admin commands (ban, kick, save, etc.) and enable codes (imacheater). This console may also be used to enter Debug mode, which can also be viewed as Creative mode since it allows Players to build without needing to worry about resources.
You can find more information on cheats and how to use them, as well as the spawn item command list, on a separate page of this guide.
How to enable it?
First, turn on the command console (F5), then enable cheats by typing in the imacheater command and confirming with the Enter key. After enabling cheats, type in the debugmode command and confirm with the Enter key. When "Debugmode True" appears on the screen, it means that Debug mode has been successfully activated. Typing the debugmode command again disables this mode.
To enable new debug mode abilities in Valheim, you will have to press the corresponding keys:
- Z - enables flying: pressing the Space bar makes your character fly up, pressing Ctrl makes them go down. Pressing the Z key again will disable flying mode, resulting in a loss of altitude (it's a good idea to protect yourself with the /god command to enable immortality) if you don't react fast enough to prevent yourself from falling;
- B - creative mode: you can build and craft new objects without consuming materials and without the workbench, but you still need the hammer;
- K - instantly kills all creatures in the vicinity.