Minecraft Function DebuggerLanguages: English / 简体中文 IntoductionMinecraft Function Debugger (VSCode Extension Part), McFD for short, is a vscode extension that provides support for debugging Minecraft functions. You can use it to debug mcfunctions like debugging other languages To use this extension, you MUST install the corresponding Fabric mod, which enables it to comunicate with the game. Features
Quick Start
UsageNow you are using VSCode. Obviously, you know basic steps of debugging (creating breakpoints and run by step, for example). So I won't repeat it here. Here are introduction of the"debugger command"。 they are commands begin with "#@". They are intentionally designed like that so that thay won't influene much even if you forget to remove them before releasing your datapack. They are as follows: #@loudBy using this command, you can force a command to output its result as an exception. Using this command will cause the game to freeze. You can use it like this:
When executing the fill command, the debugger will freeze the game and output the result as an exception. #@logThis command will output the command result but keep the game running. You can use it like this:
When executing the fill command, the debugger will output the result in the debug console. #@muteThis command will tell the debugger to ignore any exception the next command threw. You can use it like this:
Generally speaking, the player Huge_Black doesn't exist in you game. So the game will throw a "entity not found" exception. But because the #@mute, the debugger will ignore it whatsoever and will not freeze the game. But if you put a breakpoint, the breakpoint will still be hit despite the #@mute. #@getScoreboardThis command can be used to freeze the game and output scoreboard information:
will output all scores the entity selected by the selector or "fake player" hold.
will get all scores the corresponding objective holds. #@getEntityThis command is used to get some information of the selected entity.
Note: corresponding exceptions will be thrown if errors occurred when executing debugger commands. launch.jsonIn launch.json, you can enable or disable certain features. A complete launch.json may look like this one:
Here are some features:
Language SettingsYou can switch between languages via searching in the Vscode's settings for "mcfdebugger.display_language" For now, zh_cn and en_us is suported. If you are still here, I apologize for my poor English. Also, I will appreciate it if you can translate this extension into other languages or correct the mistakes in en_us and readme. |