# Debug mode

Debug mode is the way to cheat in single player: an item list to spawn anything, god mode, no clip, building without materials and a teleport. You switch it on with one launch option.

Source page: https://zomboiddb.com/debug-mode/

## How do you turn on debug mode?

Add `-debug` to the game's launch options. In Steam: right-click Project Zomboid, Properties, and type it into Launch Options. The game's start-up code sets debug mode when it finds that word among its arguments; there is nothing to switch on inside the game.

`-debug`

Debug mode works in single player and on a game you host: the game passes it on to the server it starts for you. On someone else's server your role decides which tools you get, as the right-click menu below shows.

## What does it add?

A new button on the left sidebar, Debug Menu, opens a menu with two tabs. The first one has the tools a player wants:

| Button | What it opens |
| --- | --- |
| General debuggers | General debug switches. |
| Cheats | The cheats panel: god mode, no clip, instant actions and the rest (below). |
| Climate debuggers | Weather and climate controls. |
| Craft Recipes | A window with every craft recipe. |
| Player's Stats | Your character's stats, skills and body, to change. |
| Items List | The list of every item. Pick one to put it in your inventory. |
| Fluids | Fluids and the containers that hold them. |
| Entities | The game's entities, such as workstations. |
| Script Manager | The item and recipe scripts as the game loaded them. |
| XUI Debugger | The layout of the game's windows. |
| Recipe Monitor | What happens while a recipe runs. |
| Sandbox Settings | The sandbox settings of the world you are in, to change while you play. |

The second tab is for the people who make the game: Audio, IsoRegions, Zombie Population, Stash debuggers, Anim monitor, Zomboid Radio, Animation Viewer, Attachment Editor, Chunk Debugger, Global Objects, Map Editor, Vehicle Editor, World Flares, Global Mod Data, New UI, Unit Tests, Character Debug, Forget Recipes and Seam Editor.

## The cheats panel

Cheats in the debug menu opens these switches. On a server the same panel is in the admin panel, and each switch needs the capability in the last column.

| Cheat | The game's tooltip | Capability on a server |
| --- | --- | --- |
| Invisible | Can't be seen or heard by other players. | `ToggleInvisibleHimself` |
| God Mode | Makes you immune to all damage. | `ToggleGodModHimself` |
| No Clip | Move through walls and collision tiles. | `ToggleNoclipHimself` |
| Fast Move | Fast move: Move - arrow keys Floor Up/Down - PageUp/PageDown keys | `UseFastMoveCheat` |
| Timed Action Instant | Instantly complete all timed actions. | `UseTimedActionInstantCheat` |
| Unlimited Carry | Carry an infinite encumbrance. | `ToggleUnlimitedCarry` |
| Unlimited Endurance | Never run out of breath. | `ToggleUnlimitedEndurance` |
| Unlimited Ammo | Never run out of ammo. | `ToggleUnlimitedAmmo` |
| Know All Recipes | Instantly learn all crafting recipes. | `ToggleKnowAllRecipes` |
| Build Cheat mode | Build anything without materials. | `UseBuildCheat` |
| Agriculture Cheat mode | Enable debug options for crop farming. | `UseFarmingCheat` |
| Fishing Cheat mode | Enables cheat for fishing. | `UseFishingCheat` |
| Health panel Cheat mode | Get exact health statistics on the Health screen, and cure or create injuries. | `UseHealthCheat` |
| Mechanics Cheat mode | Enables cheats relating to vehicle maintenance. | `UseMechanicsCheat` |
| Moveable Cheat | Lets you move anything Moveable object regardless of tools or skills. | `UseMovablesCheat` |
| Can See Everyone | See all players on the map and in the world. | `CanSeeAll` |
| Can Hear Everyone | See all players in the voice chat. | `CanHearAll` |
| Zombies Don't Attack. | Zombies wouldn't attack player. | `ManipulateZombie` |
| Brush Tool | Place any tile you want. | `UseBrushToolManager` |
| LootZed | Show distribution list Click on container icon in loot menu to show | `UseLootZed` |
| LootLog | Output all loot spawn to console.txt | `UseLootLog` |
| Animal Cheat | Enables cheats for animals. | `AnimalCheats` |
| Animal Extra Values | Show extra values for animal testing. | `AnimalCheats` |
| Always Day | Enables permanent daytime for the local player only. | `ClimateManager` |

## The right-click debug menu

With debug mode on, right-clicking the ground gives a Debug entry. In single player debug mode is all it needs; on a server it needs the `UseDebugContextMenu` capability, which observer and above have. Its main part has Teleport, Remove Item Tool, Spawn Vehicle, Horde Manager, Spawn Points, Reload Translations and Make Noise. The interface part opens tools such as Missing 3D Items, Missing Clothing Items, Missing Non-Clothing Items, Debug Interpolation UI, Debug Player UI and Tile Picker. Depending on what you click it also has parts for animals, players, vehicles, objects and zombies.

## Extra sandbox settings

The sandbox screen shows [WaterShutModifier](https://zomboiddb.com/sandbox-settings/#o-watershutmodifier) and [ElecShutModifier](https://zomboiddb.com/sandbox-settings/#o-elecshutmodifier) in debug mode only. They are the numbers behind the Water Shutoff and Electricity Shutoff choices (14 in Apocalypse), and here you can type them.

## Debug mode or admin commands?

They reach the same tools. In single player there is no chat, so debug mode is the only way. On a server, an admin uses the [chat commands](https://zomboiddb.com/commands/) and the admin panel on the sidebar, which has Check your Stats, Edit your Admin Powers, Items List Viewer, See Server Options, Non PVP Zone, Factions List, Roles List and Users List and more.

## Other launch options the game reads

The same start-up code also looks for `-cachedir=`, `-console_dot_txt_size_kb=`, `-useTimeStampedLogFileNames=`, `-debugLogFile=`, `-nosound`, `-aitest`, `-novoip`, `-anti-cheats`, `-imguidebugviewports`, `-imgui`, `-debuglog=`, `-debugtranslation`, `-modfolders`, `-nosteam` and `-debugcfg=`. A dedicated server reads its own, such as `-adminusername`, `-adminpassword`, `-nosteam`, `-port`, `-udpport` and `-servername`.
