Skip to main content

Rules: Debugging, verification, and version management

scripts/gen-rules.mjs builds this page from rules/*.json. Do not edit it by hand; edit the JSON and run npm run gen-rules. The rule bullets on topic pages (- **[ID]**) are filled from the same source.

Explanations and examples are on the topic page Debugging, verification, and version management.

IDRuleLevelEvidence environmentSource
DBG-01JSON UI errors are often silent (nothing drawn, a button is canceled, all modifications ignored). Turn on the Content Log and look in the client log Debug_Log<session>.txt (Windows: %APPDATA%/Minecraft Bedrock/logs/) for the lines Unknown property, Type not specified (or @-base not found), Must define a source property name in the binding!, Invalid expression and Assertion failed. Use the layout line (Full re-layout of N controls) to see whether the screen opened. But this number is counted before the factory creates cells, so the effect of a factory gate cannot be measured.measuredunknownBC-S8, BC-facts, BC-S12, MJ chapter 8-8
DBG-02Change only one thing in an experiment, and first confirm from the log that the screen actually opened (whether the title string is in the log). A session in which the probe did not run at all proves nothing. "Do not infer what seems like it will work; copy what works" is the lesson the bedrock-core author left after seven failures.measuredunknownBC-S6, BC-S8, BC chapter 7-9
DBG-03Do not lump a failure into "not visible". Draw the frame (a border that is always drawn), the value display (the same value as text) and the real target (size, visibility) together to tell "mount failure / binding failure / layout failure". For gates, draw both the expression and its negation (YES/no) to check whether the expression itself failed.measuredunknownBC-S6, BC-S14
DBG-04Put experiments that could break the screen (with a chance of a crash) on a separately made experiment screen, not on the screen under development.measuredunknownBC-S6
DBG-05schemas/rp/ui/index.schema.json of the official schemas (@minecraft/bedrock-schemas) checks only namespace, so it is useless for validating UI files. The real enum values are only in forms/ui/ui_element.form.json, and types/rp/ui/UiElement.d.ts has empty enum members.measured, code (source)unknownBC-facts
DBG-06The official enum and vanilla use do not contain each other. Vanilla uses types not in the enum (factory, collection_panel, tooltip_trigger …), binding_condition: "none", font_size: "medium" (not a value in the engine either, so it draws as normal, TXT-05) and input_mode_condition: "gamepad"/"not_gamepad", and does not use the enum's grid_rescaling_type: "none". collection_index, localize, clip_ratio, property_bag, modifications, variables and the array form of nineslice_size are in no official material.vanilla, measuredunknownVN, BC-facts, Appendix B
DBG-07Check the property and value dictionary in both directions. If you only look at "is the name vanilla uses in the dictionary", you cannot catch names not in vanilla creeping into the dictionary (resolve_ancestor_scope, the scroll_box type, z_order, etc.).vanilla, code (source)-MJ 4.2 cause, MJ chapter 8-3, BW-doc
DBG-08Common false positives of community pack checkers: no namespace in vanilla merging files, the _global_variables.json not-registered warning, and high-layer warnings. Conversely, some tools do not check and simply pass UI files registered with an extension other than .json.code (source), inferred-MJ chapter 5
DBG-09"Flat top-level definitions + absolute px" JSON made with a generator tool does not show in the game unless it is connected to some vanilla screen. Before using it as an example, check the host connection (chapter 10).code (source)-MJ chapter 5
DBG-10The evidence priority is (1) the target pack and logs, (2) the pinned vanilla version, (3) confirmed external sources, (4) inference. When writing in a document, mark which stage of evidence it is. The verification level notation of this guide is that format.code (source), inferred-MJ chapters 2 and 8-4
DBG-11Do not write highly repetitive structures (a bit decoder, hundreds of nodes) by hand; build them with a generator. If the script encoder and the UI generator read one spec file together, the two do not go out of sync.working pack, code (source)-BA chapters 1 and 9-9, BC chapter 3
DBG-12When a new version comes out, first diff the vanilla points this guide relies on (the factory structure of server_form.json, hud_title_text, root_panel and chat_grid_item of hud_screen.json, npc_interact_screen.json, and small_chest_screen of chest_screen.json).vanilla, inferred-VN, MJ 4.1
DBG-13The changes above are a sample recheck against vanilla of another project's (MJ) version comparison table. When using a pack from an earlier version on 1.26.50 or later, check from these points.vanilla-MJ 4.1 and 8-1, VN
DBG-14Add-on frameworks (bedrock-core 0.x, etc.) have made protocol changes that break with each version. When depending on one, pin the version and follow the source code rather than the documentation site.code (source)-BC chapter 8
DBG-15JSON UI has no version field. If vanilla changes, a pack breaks as it is. The order for reducing contact points: write only properties to change (FILE-21), modifications (MOD-13), one entry point (MOD-15), minimize path keys (FILE-27).inferred-BW-best
DBG-16Mojang is moving screens to Ore UI, and plaintext resource packs cannot change the layout or behavior of Ore UI screens (only the look of buttons and textures are reached, ALT-15). Up to 26.63 a pack with an empty content.zipe in its root or a pack the server sent encrypted changed the in-game Ore UI pages, but this is blocked from 26.64 (ALT-11). For each new version, first check whether the target screen is still a JSON file in vanilla resource_pack/ui/ (for example, 1.26.50 does not have the feed_screen, comment_screen and manage_feed_screen files the wiki lists). If you have the install, also look at supportedRoutes in data/gui/dist/hbui/routes.json (ALT-11, ALT-13).unverified, vanilla, code (source)-BW-intro warning, BW-font, VN, OUC
DBG-17Performance: the wiki counts JSON UI as the second most expensive subsystem after entities. Reduce the number of expressions and bindings ((2 * (-1 * $n)) to (-2 * $n)), merge several controls of the same shape into one binding such as #texture, and delete unused controls or set ignored: true. On Windows 1.26.65.1, a 600-cell grid where each cell shows one of 10 images had more than 6714 controls, and switching to one #texture image gave 762. At 2400 cells the FPS was 114 to 115 against 125 to 143 (measurement record).measured, inferredWindows 1.26.65.1BW-best, 2026-11-18 Windows 1.26.65.1
DBG-18The game reads the development pack folder (in the Windows 1.26.52 of this measurement, %APPDATA%/Minecraft Bedrock/Users/Shared/games/com.mojang/development_*_packs) and the world list at startup. A game left running for a long time does not see newly placed packs or copied worlds, so restart the game if you placed a pack for the first time. When attaching a pack to a world, activating it from the behavior pack and resource pack lists of the world edit screen is the surest.measuredWindows 1.26.52TP
DBG-19In a setup where a probe screen attached to the server form is created in every form through a visible gate, if there was an expression that puts (#v - 0) or (#v * 1) against a non-numeric body ('pick probe') into #size_binding_x, or puts / 100 into #clip_ratio, the 1.26.52 client exited the moment an action form was opened (once). An earlier setup containing a collection_panel computed length gate, path dictionary lookup and factory_variables cells froze at the same point (twice). Which element was the cause could not be isolated. Considering that the expressions of every control that can be created must be safe even for wrong input (an empty string, another form's body), make an expression that goes into a numeric property get created only inside a gate that checks the input format first (COL-10, EXP-21, LAY-14).measured, inferredWindows 1.26.52TP
DBG-20The Ore UI patch tool (OUC) re-extracts short names from minified code using stable strings such as translation keys and data-testid as anchors, and applies only the rest, leaving out failed patches. JSON UI packs also break less on version changes if they follow the same principles (rely only on stable names, localize failures). The same conclusion as DBG-15.code (source), inferred-OUC 4.2
DBG-21To preview layout, variables and expressions without the game, you can use the Cinnabar JSON-UI editor (jsonui.cinnabar.gg). The engine rules are a native reconstruction but fonts, the HUD and error handling differ from vanilla, so make the final check in game. It has a noncommercial license.code (source)-CN
DBG-22To check the result of expressions without vanilla, build and run the evaluator of Cinnabar crates/json-ui. Method: clone the Cinnabar repository (checked at ceb0fb6), append the test code predicate_probe.rs this project newly wrote to the end of crates/json-ui/src/predicate/tests.rs and put zz_probe.rs in crates/json-ui/tests/, and run cargo test -p json-ui --locked --lib zz_probe -- --nocapture (expressions, PROBE lines) and cargo test -p json-ui --locked --test zz_probe -- --nocapture (size expressions and variable scopes, LEN and SCOPE lines). rust-toolchain.toml pins Rust 1.99.0 so rustup downloads it the first time, and building only the json-ui crate has few dependencies and finishes in a few minutes. Crashes and asserts are not reproduced.code (source)-CN-run
DBG-33The content log of the Windows release client accumulated in %APPDATA%/Minecraft Bedrock/logs/ContentLog<date>.txt. Unknown property was left, but Invalid expression of a % expression was not (EXP-46). An expression is not right just because it is absent from the log.measuredWindows 1.26.52DF
DBG-34You can find the cause right away from the JSON UI parse failure messages in the content log. Messages in the engine: type checks - expected a bool., a number., a string., an object., an array., an array or a number., an array or a string.; bindings Must define bindings as an array., Must define a binding name!, Must define a collection name for the binding!, Must define a source property name in the binding!, Must define a target property name in the binding!, resolve_ancestor_scope and resolve_sibling_scope cannot both be set!; factories The factory name should not be empty!, factory_variables should all be strings …; others Invalid anim reference!, Must define 'images' as an array!, Must define state_controls as an array!, and the focus and font messages. Reference errors are Expected variable not found in ancestor tree: '%s' (variable) and UI control reference not found: '%s' (@ reference).code (binary)Android 1.26.52.3NB chapter 4
DBG-35When measuring in-game clicks with a screen automation tool, leave time between press and release. computer-use left_click (press and release back to back) was ignored by the game, and pressing a button and releasing it 0.15 s later worked like a real mouse. Results measured with such clicks that say "pressing sends nothing" must be measured again. Send bedrock MCP feed clicks as press, 0.15 s, release too.measuredWindows 1.26.65.1SG, HSB, Windows 1.26.65.1
DBG-36The "debug" value of any control is one of eight: red, black, white, green, yellow, purple, gray, blue. It fills the control's area with that color at 20% opacity (purple about (0.5, 0, 0.5), gray about 0.5). Values outside the list (orange, #ff00ff) and upper case (RED) all become red.measured, code (binary)Windows 1.26.65.12026-12-03 Windows 1.26.65.1 measurement and decompilation

Proposed rules​

These proposals are not merged into the adopted rules yet. Check the evidence before using them.

IDRuleLevelEvidence environmentSource
DBG-23Community UI schemas produce errors on vanilla too. Validating the 205 vanilla 1.26.50.4 files, the Blockception latest source gives 116 errors in 43 files (50 unknown properties), Bugrock (KalmeMarq) 2,224 errors in 186 files (size expression and texture path regular expressions), and the 2025-09 schema bundled in Blockception VS Code extension v8.0.46 2,251 errors in 193 files (rejects "100%c", negative offsets and size expressions). For a schema error, first grep whether vanilla has the same form to tell whether it is a false positive.code (source)-UIS
DBG-24Passing a schema does not mean the game accepts it. The Blockception schema attaches an "any identifier" alternative to every enum, letting through clip_direction: "dwn" and font_size: "huge", puts left, top and center_middle, which vanilla lacks, in the anchor enum, and puts top and bottom, which vanilla does not use (vanilla uses up and down), in the clip_direction enum. Bugrock lets through 51 NetEase-only types and properties. Check names and values with the value dictionary and a vanilla grep (DBG-07). Grep vanilla use for names generators and schemas produce (for example, the scroll view roles are scrollbar_track/scrollbar_box and not scroll_bar_track, and the toggle forced index is toggle_group_forced_index).code (source), vanilla-UIS, EasyUIBuilder, jsonui-lsp, VN
DBG-25Vanilla also has broken values left: "size": [ "fill%", "100%" ] (sidebar_navigation.json:881), a one-element "size": [ "100%, 100%" ] (store_promo_timeline_screen.json:1380), an "ignored": "($nx_os or $is_ps4" with unclosed parentheses (xbl_console_signin_succeeded.json:221), "max_size": [] (ui_common.json:6551), and "100c%" of LAY-36. A value that appears once or twice in vanilla is not evidence that it is valid. When using it as evidence, check whether it is used with the same intent in several screens.vanilla-UIS, VN
DBG-26Do not use the Microsoft Learn JSON UI reference (JsonUiReference, AI-assisted generation, 2025-02-11) as a source. Use it only as a list of property names and check types and meanings against vanilla. It lists font_scale_factor and default_focus_precedence as Boolean, grid_item_template as Integer and factory as String, mixes in China-edition-only nine_slice_buttom, place_holder_text and slider_range (0 uses in vanilla), and its enum table is only undefined. jsonui-lsp (the VS Code extension jsonui-support, MIT) suggests $variables that vanilla templates accept and goes to definitions using a dictionary (type and $variable per control) extracted from all of vanilla 1.26.50.4 ui/, but has no diagnostics, hover, layout or expression checks, and the Marketplace version (v0.3.1) is the 1.21.120.4 dictionary.vanilla, code (source)-ML, jsonui-lsp
DBG-27JSON made by China edition (NetEase) documents and UI editors mixes in properties the international edition lacks (is_new_nine_slice, nine_slice_top/left/right/bottom and nine_slice_buttom, rotate_pivot, rotate_angle, is_handle_button_move_event, is_swallow, gradient_direction), types (stack_grid, rich_text, combox, joystick, etc.), templates (common_selection_wheels, combo_box, mini_map) and %module.method mappings. Filter by vanilla use counts before using.vanilla-NetEase documentation, VN 0 uses
DBG-28The preview of a visual editor is not the engine layout. The JsonForge canvas computes anchor_from/anchor_to backwards, does not stack stack panels, propagates alpha to children, and does not handle %, %c, fill and default. The w1zardz editor treats %c as the largest child and default as content size and uses the offset and anchors of stack children as they are. The two tools also assume different screen sizes (384x216, 427x240). Use the preview only for rough placement and check positions in game. If you need a preview closer to the engine rules, use the Cinnabar editor (DBG-21).code (source)-JsonForge, w1zardz, Cinnabar
DBG-29JsonForge's "Export JSON" puts only names for children without @ references so all child properties are lost, and drops some binding keys (binding_collection_name, source_control_name). If you use it, use "Export add-on", but fix the HUD overlay (insert into an inherited array, MOD-04), the close button offset (LAY-17), and the server form router that makes a blank screen for forms whose title does not match (HOST-15). Put a server_form.json made by a generator next to vanilla and check whether controls is an array, the inheritance target of the redeclaration key (long_form@common_dialogs.main_panel_no_buttons), and whether the multi-screen exclusion gate expression is a chain of and or subtraction.code (source), inferred-JsonForge, EasyUIBuilder
DBG-30Check JSON made by an expression compiler (AsaJS 4.2.0) again with the expression rules. Confirmed problems: mismatched parentheses in the ternary ?: output, an exponent literal (1e-2) emitted as 0.01 (the integer 0), an auxiliary binding containing only literals (BND-05), % applied to a string binding (EXP-32), no check for chained comparison (EXP-28), and decimal literals cannot be used.code (source)-AsaJS
DBG-32If an obfuscation or build tool changes the path of UI files, redeclaration of vanilla definitions and modifications silently become invalid (FILE-22, MOD-02). The JsonEncryptor zip mode defaults (name hashing, per-definition splitting, moving to ui/obfuscated/) do this. Process vanilla path files while keeping their path and first check that vanilla modifications are visible in the resulting pack. Tools that insert comments into JSON with regular expressions ("scrambling") stop at , and } inside strings and turn "Hello, world" into "Hello/*...*/, world". The comment shows in labels and expressions break silently, so turn this feature off if there is text or an expression containing commas.code (source), inferred-JsonEncryptor
Sources
idSourceLicenseCommitAccessed
repo-guideJSON UI comprehensive guide (this repository) (guide/)This project's material2026-11-13
private-researchPrivate research (-)-2026-11-13