How to Use the JFR Command in Minecraft

This Minecraft tutorial explains how to use the /jfr command with screenshots and step-by-step instructions.

The /jfr command allows you to start JFR profiling your Minecraft session by creating a JFR file. This file contains diagnostic and profiling data about a running Java application which, in this case, is Minecraft Java Edition. The JFR file must be opened by special software such as Java Flight Recorder by Oracle (there may be other tools that you can use to open the JFR file as well). Let's explore how to use this cheat (game command).

Supported Platforms

The /jfr command is available in the following versions of Minecraft:

PlatformSupported (Version*)
Java Edition (PC/Mac) Java Edition (PC/Mac)Yes (1.18)
Pocket Edition (PE) Pocket Edition (PE)No
Xbox 360 Xbox 360No
Xbox One Xbox OneNo
PS3 PS3No
PS4 PS4No
Wii U Wii UNo
Nintendo Switch Nintendo SwitchNo
Windows 10 Edition Windows 10 EditionNo
Education Edition Education EditionNo

* The version that it was added or removed, if applicable.
NOTE: Pocket Edition (PE), Xbox One, PS4, Nintendo Switch, and Windows 10 Edition are now called Bedrock Edition. We will continue to show them individually for version history.

Requirements

To run game commands in Minecraft, you have to turn cheats on in your world.

JFR Command

Where is the JFR File Stored in Java Edition?

Depending on your version of Minecraft Java Edition, the JFR file would be be saved under one of the following hidden paths (Note: path may be different on your system):

Path for Windows
C:\Users\<username>\AppData\Roaming\.minecraft\debug\
Path for Mac
/Users/<username>/Library/Application Support/minecraft/debug/

How to Enter the Command

1. Open the Chat Window

The easiest way to run a command in Minecraft is within the chat window. The game control to open the chat window depends on the version of Minecraft:

  • For Java Edition (PC/Mac), press the T key to open the chat window.

2. Type the Command

We will cover examples of how to both start and stop the JFR profiling process.

Start JFR Profiling

To start the JFR profilling process, you can enter the following command:

/jfr start

jfr command start

This command will start the process of recording the data for the running Minecraft Java program.

jfr command start

You will see the message "JFR profiling started" appear in the lower left corner of the game window.

Stop JFR Profiling

When you are finished and want to stop the JFR profiling process, you can enter the following command:

/jfr stop

jfr command start

Now the JFR profiling will be stopped and the JFR file will be dumped and saved.

jfr command start

You will see the message "JFR profiling stopped and dumped to debug/<filename>.jfr" appear in the lower left corner of the game window. Note that the last part of the message contains the filename of the JFR file that was created in the debug folder. In this tutorial, the JFR file was called client-2021-11-28-082945.jfr.

Each time you run these commands, a new JFR file will be created in the debug folder. You can then use a program such as Java Flight Recorder by Oracle (or similar program) to open and analyze the contents of the JFR file.

Congratulations, you just learned how to use the /jfr command in Minecraft!