/script Command in Minecraft Bedrock Edition

Debug Scripts and Track Performance in Minecraft

Bedrock EditionDebug & DeveloperPermission: AdminCheats: Yes

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.

Syntax (3 forms)

  1. /script debugger listen <port: int>

    Start profiler

  2. /script debugger connect [host: string] [port: int]

    Stop profiler

  3. /script debugger close

    Watchdog export stats

Arguments

ArgumentTypeWhat it means
hoststring- `port`: int

Examples

Tips

Common mistakes

Bedrock vs Java

Minecraft Java Edition does not have a /script command, so these script debugging options are only available in Bedrock Edition.

FAQ

What permission level do I need to use the /script command?

You need the Admin permission level and cheats must be enabled in the world to use this command.

Can I use the /script command in Minecraft Java Edition?

No, Java Edition has no command with this name, as it is exclusive to Minecraft Bedrock Edition.

How do I export watchdog statistics for my script?

You can run /script debugger close to export watchdog statistics on script runtime behavior and memory consumption.

Related commands

/gametest/help/project/reloadconfig