Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/debug

From SAS Gaming Wiki

Script error: No such module "Exclusive". Template:Infobox command

Starts or stops a time profiler session. Gets more detailed information of function execution.

Syntax

debug start

Starts a new debug time profiler session.

debug stop

Stops the active debug time profiler session.

debug function <name>

Used the same way as /function to get more detailed information of commands' execution. Could not be called directly or indirectly by
  1. REDIRECT Template:Command

Template:Redr or another

  1. REDIRECT Template:Command

Template:Redr.

Arguments

<name>: function

{{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|function}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}

{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On fail}}{{#vardefine:output1-{{#var:output-table-lines}}|N/A}}{{#vardefine:output2-{{#var:output-table-lines}}|0}}{{#vardefine:output3-{{#var:output-table-lines}}|0}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|je}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|N/A}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|0}}{{#vardefine:commands-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:command-{{#var:commands-num}}|/debug start}}{{#vardefine:command-row-{{#var:commands-num}}|1}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|N/A}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|the average tps (ticks per second) during debug profiling}}{{#vardefine:commands-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:command-{{#var:commands-num}}|/debug stop}}{{#vardefine:command-row-{{#var:commands-num}}|1}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|N/A}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|the total number of commands in the functions}}{{#vardefine:commands-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:command-{{#var:commands-num}}|/debug function}}{{#vardefine:command-row-{{#var:commands-num}}|1}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}}

{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}

File structure

Function trace

When using

  1. REDIRECT Template:Command

Template:Redr, a txt file titled debug-trace-yyyy-MM-dd_HH.mm.ss.txt is created in .minecraft/debug.

In this file,

  • [C] <command> means the <command> is executed.
  • [M] <message> means a message is returned.
  • [E] <message> means a failure message is returned.
  • [R = <num>] <command> means the <command> returns a brigadier return value.
  • [C] <command> -> <num> means the <command> is executed and returns a brigadier return value.
  • [F] <function> size=<num> means a function is called.

For most commands, the brigadier return value is equal to the result value that can be stored with /execute store result.

But for /execute ... with one or more of the following subcommands, each branch returns its success value as its brigadier return value:

  • ... if ... (not at the end)
  • ... unless ... (not at the end)
  • ... as <targets> ...
  • ... at <targets> ...
  • ... positioned as <targets> ...
  • ... rotated as <targets> ...
  • ... facing entity <targets> <anchor> ...

Some commands like /return and /function have no brigadier return value.

Profile result

Template:Outdated feature When using

  1. REDIRECT Template:Command

Template:Redr, a txt file titled profile-results-yyyy-MM-dd_HH.mm.ss.txt is created in .minecraft/debug, which includes the result of profile dump.

Report

Template:Outdated feature When using

  1. REDIRECT Template:Command

Template:Redr, a ZIP file is created with in .minecraft/debug/profiling the following structure:

  • debug-report-yyyy-MM-dd_HH.mm.ss.zip
    • levels
      • minecraft or <other custom namespaces>
        • overworld or the_end or the_nether or <other custom dimensions>
          • block_entities.csv: Contains a list of block entities in the world in the format x,y,z,type.
          • chunks.csv: Contains a list of chunk information in the format
  1. REDIRECT Template:Code

Template:Redr.

          • entities.csv: Contains a list of entities in the world in the format
  1. REDIRECT Template:Code

Template:Redr.

          • example_crash.txt: An example crash file.
          • stats.txt: Contains some stats.
    • classpath.txt: Contains the file paths of the external jars Minecraft uses.
    • example_crash.txt: An example crash file.
    • gamerules.txt: A plain text file containing a list of game rules and their values (<gamerule>=<value>).
    • stats.txt: Contains some stats.
    • threads.txt: All running threads.

History

Template:HistoryTable

Navigation

All editions
Removed
Template:El only
Debug
Removed
Template:Els only
Template:El only
Removed
Template:El only
Removed
Template:Els only
Removed
Joke
Related

de:Befehl/debug ja:コマンド/debug pt:Comandos/debug ru:Команды консоли/debug zh:命令/debug