Special Commands
Miscellaneous commands for debugging, publishing, tick control, and other special operations.
/debugStarts or stops a debug profiling session, or runs a function with a full trace of every command it executes.
/publishOpens a singleplayer world to LAN, allowing other players on the local network to join.
/tickControls the server tick rate. Allows freezing, stepping through, and changing the speed of game ticks for debugging and testing.
/tick for testing farms and machines
/tick arrived in Java 1.20.3. It needs permission level 3 and will not run from a command block. /tick query shows the target rate and how long ticks are really taking, and /tick rate sets a target between 1 and 10000 ticks per second, where 20 is normal. Players themselves don't speed up past 20.
/tick freeze stops everything except players and whatever they are riding. Doors, levers and redstone dust still react, because they don't wait for a tick. While frozen, /tick step runs one tick, or as many as you ask for. /tick sprint 1d pushes a full day of ticks through as fast as the machine allows and then reports how long they took, which makes it a quick way to test a farm.
/debug for data pack authors
/debug start and /debug stop time a session and hand back one number: the average ticks per second while it ran. The useful part is /debug function. It runs a function and writes a trace file to the debug folder, listing every command that ran, every message or failure it produced and every nested function call. When a data pack misbehaves, that file is the first place to look.
For a full performance capture with entity and chunk lists, use /perf start on a dedicated server or F3+L in single player. /debug needs level 3.
/publish for LAN games
/publish opens a single-player world to your local network. It needs level 4 and isn't available on a dedicated server. Commands stay off for the LAN session unless you pass true, and if you skip the port the game picks a free one and shows it in chat. The world is only reachable while the host has it open.