News
Game
Guides
Downloads
Versions
/debug
COMMANDS DEBUG & TESTS SERVER · LEVEL 3 Added in 1.14 or earlier

/debug command in Minecraft

/debug starts and stops a tick profiler that measures how fast the server runs, and traces every command run by a function. It is a tool for data pack authors and server admins chasing lag or a function that misbehaves.

Syntax

/debug function <name>
/debug start
/debug stop

// In single player with cheats on, you have level 4, so it works there too.

ArgumentExpectsWhat it does
nameFunctionID of the function to trace, such as blockaria:tick, or a function tag starting with #.

Examples

Start the tick profiler

/debug start

Begins measuring server ticks until you stop it.

Java 26.3

Stop and read the result

/debug stop

Shows the recorded time, ticks and average ticks per second.

Java 26.3

Trace a function

/debug function blockaria:tick

Runs the function and saves every executed command to a file.

Java 26.3
Build your command

Fill in the fields, then copy the command.

Command generator

Profiling with start and stop

debug start begins measuring. debug stop ends it and reports the seconds and ticks recorded, with the average ticks per second. A world without lag runs at 20 ticks per second.

Tracing a function

debug function blockaria:tick runs the /function and writes each executed command to an output file, named in chat. It cannot be called from inside a function, nor with return run. For deeper analysis, see /perf and /jfr; to slow the game down while testing, use /tick.

✓ Checked in Java Edition 26.3 · updated 2 November 2026

/debug: FAQ

What does "Can't trace from inside of function" mean?

/debug function was called from a function. Run it from the chat, the server console or a command block instead.

What is the difference between /debug and /perf?

/debug start runs until you stop it and reports ticks per second. /perf records a 10 second performance report and saves it as a file.

How do I use /debug?

In single player with cheats on, or on a server as an operator or from the server console: /debug function <name>.

Who can use /debug?

Server operator, level 3. In single player with cheats on, you have level 4, so it works there too.

Related commands