/debug
Starts or stops a debug profiling session, or profiles a specific function. Generates a profiling report in the debug folder.
Overview
Starts or stops a debug profiling session, or profiles a specific function. Generates a profiling report in the debug folder. In vanilla Minecraft Java Edition it is one of the special commands and has been available since version 1.0.
It is invoked as /debug and accepts one required argument (
Profiling reports are saved in the 'debug' folder within the world directory. The report includes tick timing, entity counts, and other performance data. Useful for identifying lag sources.
A start/stop session writes a profiling report into the world's debug folder once stopped; there is no live readout. The report captures tick timing and entity counts for tracking down lag.
Syntax & Arguments
/debug <start|stop|function> [<function>]The full syntax is /debug . Angle brackets < > mark required arguments and square brackets [ ] mark optional ones; a vertical bar | between words means you pick exactly one of those literals. You must always supply
- action
- Required, of type a literal. start = begin profiling; stop = end profiling and save report; function = profile a specific function.
- function
- Optional, of type a resource. The function to profile (only for 'function' action).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| action | literal | Required | start = begin profiling; stop = end profiling and save report; function = profile a specific function. |
| function | resource | Optional | The function to profile (only for 'function' action). |
Examples
The 3 examples below are ready to copy and adapt. For instance, /debug start starts a server profiling session. Each example varies the arguments to show a different real use of /debug; read the note under every snippet to see exactly what changes.
/debug startStarts a server profiling session.
/debug stopStops profiling and saves the report to the debug folder.
/debug function my_pack:heavy_functionProfiles a specific function and outputs performance data.
Permission Level & Requirements
/debug sits at permission Level 3 - Admin, which means it needs permission level 3 (administrator).
Requires level 3.
This reference describes the Java Edition 1.21 form of the command; Bedrock Edition may use slightly different argument formats.
Common Mistakes
- Running /debug start without /debug stop, the profiling session continues until stopped, collecting data indefinitely.
- Expecting real-time output, the report is saved as a file after stopping.
Notes
Profiling reports are saved in the 'debug' folder within the world directory. The report includes tick timing, entity counts, and other performance data. Useful for identifying lag sources.
Related Commands
If /debug is part of your toolkit, the commands below are the ones you will most often reach for alongside it: /function and /tick. They cover closely related tasks, so the links above jump straight to each one.
Frequently Asked Questions about /debug
What does the /debug command do in Minecraft?
Starts or stops a debug profiling session, or profiles a specific function. Generates a profiling report in the debug folder. It belongs to the special command group and was added in Java Edition 1.0.
What is the correct syntax for /debug?
/debug
What permission level does /debug need?
It requires permission Level 3 - Admin. On a server the player must be an operator at that level, or have cheats enabled in single-player.
What is a common mistake when using /debug?
Running /debug start without /debug stop, the profiling session continues until stopped, collecting data indefinitely.
Can you give an example of /debug in use?
Yes. /debug stop — stops profiling and saves the report to the debug folder.
Need a Minecraft server?
Try these commands on Astroworld or host your own server.
Try Astroworld Hosting