Debug Scripts and Track Performance in Minecraft
The /script command gives you debugging options for scripts running inside Minecraft Bedrock Edition. It lets you control the script debugger, manage profiler performance tracking, and export runtime behavior statistics.
Players and creators use this command when testing scripts to check memory consumption and runtime performance. You must have admin permissions and cheats enabled in your world to run it.
/script debugger listen <port: int>Start profiler
/script debugger connect [host: string] [port: int]Stop profiler
/script debugger closeWatchdog export stats
| Argument | Type | What it means |
|---|---|---|
host | string | - `port`: int |
/script debugger closeCloses the active script debugger session and exports watchdog statistics on memory consumption.
/script debugger listen 19144Starts profiler performance tracking and sets the debugger to listen on port 19144.
/script debugger listen 8080Starts tracking script performance while listening for a connection on port 8080.
/script debugger connectStops profiler performance tracking using the default host and port settings.
/script debugger connect localhostStops profiler tracking and connects the debugger to the localhost address.
/script debugger connect 127.0.0.1 19145Stops performance tracking and connects to the local IP address 127.0.0.1 on port 19145.
/script debugger connect 192.168.1.50 9229Connects the script debugger to a local network host at 192.168.1.50 using port 9229.
Minecraft Java Edition does not have a /script command, so these script debugging options are only available in Bedrock Edition.
You need the Admin permission level and cheats must be enabled in the world to use this command.
No, Java Edition has no command with this name, as it is exclusive to Minecraft Bedrock Edition.
You can run /script debugger close to export watchdog statistics on script runtime behavior and memory consumption.