
Command
/debug
Starts and stops a performance measurement of the game's ticks, or runs a function and writes down every command it executes.
| /debug function <name> |
| /debug (start|stop) |
| Argument | Kind of value | What to type |
|---|---|---|
| <name> | Function | For function: the id of the function to trace, or a function tag starting with #. |
| Permission level | 3: server operators with level 3 or higher |
| Works in | Singleplayer with cheats enabled and multiplayer servers. Needs permission level 3 (admins). Command blocks and functions run at level 2 and cannot use it. |
| Result | start reports "Started tick profiling" and returns 0. stop reports how many seconds and ticks were measured and the average ticks per second, and returns the ticks per second as a whole number. function reports how many commands were traced and the name of the output file. |
| start | Begins measuring. Fails with "The tick profiler is already started" if a measurement is running. |
| stop | Ends the measurement and reports the result. Fails with "The tick profiler hasn't started" if none is running. |
| function | Runs the given function or function tag and writes a trace of every command, result, function call, message, and error to a text file named debug-trace- followed by the date and time, in the debug folder of the game or server directory. |
| Function limits | The traced function runs with at most permission level 2. Tracing cannot be started from inside a function and cannot be combined with /return run. |
/debug startStarts measuring tick performance.
/debug stopStops measuring and shows the average ticks per second.

