Testing¶
9 tools for map check, asset validation, Blueprint errors, breakpoints and debugging, and watching a property in PIE.
Back to the index.
check_blueprint_errors¶
Read-only
Quick static check of one Blueprint without compiling it: the cached status of its last compile (an error status adds one generic line, never the compiler messages; a never-compiled Blueprint reads Unknown) plus structural findings: no parent class, a component template without a class, a variable without a name or type, an empty function or one without an entry node, and pin-less nodes. Read-only: it compiles, saves and changes nothing, so its answer can be stale after edits. error_status is Clean, Warnings Only or Errors Found. For the real compiler errors and their nodes use compile_blueprint (it recompiles); for graph bugs that compile clean, lint_blueprint_graph; for a whole folder, audit_blueprint_health. A name matching no Blueprint, or several, is an error.
| Parameter | Type | Required | Description |
|---|---|---|---|
blueprint_path |
string | yes | Object path, package path or bare short name of the Blueprint, e.g. '/Game/Blueprints/BP_Door' or 'BP_Door'; a short name several Blueprints share is an error listing the candidates. |
Returns: { blueprint_path: string, resolved_object_path: string, blueprint_class: string, is_blueprint: bool, error_status: string, error_message: string, errors: [string], warnings: [string], error_count: int, warning_count: int, blueprint_compiled: bool, compilation_status: string, is_static_analysis: bool, recompiled_blueprint: bool, orphaned_node_heuristic: string }
get_blueprint_debug_info¶
Read-only
Read a Blueprint's structure, metadata and complexity in one static report: cached compile status, file size, function/event/variable/component/node counts, function names, variables, components, a heuristic complexity score with its level, a performance rating and advice; with function_name, one function graph's node and pin counts; with include_graph_listing, every graph's nodes listed. An asset that resolves but is not a Blueprint is not an error: the reply is its identity with is_blueprint false. Read-only: nothing is compiled (compile_blueprint compiles), and nothing is executed or traced at runtime: observe runtime with set_blueprint_breakpoint (+ PIE) or watch_pie_property; the cached compile errors and structural problems are check_blueprint_errors.
| Parameter | Type | Required | Description |
|---|---|---|---|
blueprint_path |
string | yes | Object path, package path, or bare short name of the blueprint (resolved via mcp_common::ResolveAssetFlexible; ambiguity errors out listing candidates) |
function_name |
string | no | Optional name of one of the Blueprint's own function graphs (case-insensitive) to analyze statically: adds function_name and function_exists and, when it exists, function_node_count, function_pin_count, function_rating (Good, Moderate over 20 nodes, Complex over 50) and function_issues. The function is never executed; an unknown name is function_exists false, not an error. |
include_graph_listing |
boolean | no | Optional (default false): add a static listing of every function and event graph with its nodes, in array order rather than execution order: execution_flow, function_calls (function graph names), event_calls (event graph names), graphs_analyzed, includes_composite_subgraphs and limitations. |
include_composites |
boolean | no | Optional (default false), used with include_graph_listing: also descend into collapsed composite subgraphs (UEdGraph::SubGraphs). Macro-instance graphs are never followed. |
Returns: { blueprint_path: string, resolved_object_path: string, blueprint_class: string, is_blueprint: bool, debug_status: string, debug_level: string, debug_message: string, file_size_bytes: int, file_size_mb: number, function_count: int, event_count: int, variable_count: int, component_count: int, total_nodes: int, parent_class: string, blueprint_compiled: bool, compilation_status: string, function_names: [string], variable_info: [{ name, type, category, is_public, is_editable }], component_info: [{ name, class, is_root }], complexity_score: number, complexity_level: string, performance_rating: string, recommendations: [string], function_name?: string, function_exists?: bool, function_node_count?: int, function_pin_count?: int, function_rating?: string, function_issues?: [string], execution_flow?: [string], function_calls?: [string], event_calls?: [string], graphs_analyzed?: int, includes_composite_subgraphs?: bool, limitations?: [string] }
list_validators¶
Read-only
List the editor data validators the DataValidation subsystem has enabled (ForEachEnabledValidator): class_name, class_path and enabled for each, plus validator_count. Read-only; errors when the DataValidation plugin subsystem is unavailable. validate_asset runs them on one asset.
No parameters.
Returns: { validators: [{ class_name: string, class_path: string, enabled: bool }], validator_count: number }
remove_blueprint_breakpoint¶
Destructive Idempotent
Remove a debugging breakpoint from a specific node within a blueprint graph via FKismetDebugUtilities::RemoveBreakpointFromNode. Idempotent (already_absent when none exists).
| Parameter | Type | Required | Description |
|---|---|---|---|
blueprint_path |
string | yes | Object path, package path, or bare short name of the blueprint (resolved via mcp_common::ResolveAssetFlexible; ambiguity errors out listing candidates) |
node_name |
string | yes | Name or title of the graph node to remove the breakpoint from (title-contains match) |
Returns: { blueprint_path: string, node_name: string, removed: bool, already_absent: bool, found_in_graph: bool, node_class?: string, node_title?: string }
run_map_check¶
Destructive
Run the editor's Map Check (the MAP CHECK console command) on the level open in the editor and report error, warning and info counts plus up to 200 messages, each resolved back to the actor or component the engine attached to it. Use it to find level problems such as missing meshes, actors with invalid settings or lighting that needs a rebuild; for assets use validate_asset or validate_assets_in_path, for Blueprints check_blueprint_errors. It changes no actor or asset and saves nothing, but it replaces the contents of the editor's Map Check message log (no window opens); get_message_log_entries rereads it. Severity numbers: 1 error, 2 performance warning, 3 warning, 4 info. The counts cover every message and messages_truncated says when the list was capped. Editor world only, not a PIE session; success is false when the editor did not run the command, and the counts are then stale.
| Parameter | Type | Required | Description |
|---|---|---|---|
check_deprecated_only |
boolean | no | When true, runs MAP CHECKDEP: only the deprecated-class checks (optional, default false) |
base_libraries |
array | no | Package roots, e.g. ["/Game/Marketplace"], to classify each message's class against (optional, default: the project's Read Only Content Roots). An explicit [] disables the classification. Reported as data in class_root/class_root_is_base_library; the tool never judges which root is "upstream". |
Returns: { world: string, map_check_ran: bool, check_deprecated_only: bool, base_libraries: [string], error_count: number, warning_count: number, info_count: number, total_messages: number, messages_truncated: bool, messages: [{ severity: number, text: string, token_source: string, object_path: string, object_resolved: bool, actor_name: string, actor_label: string, actor_path: string, actor_class: string, actor_guid: string, component_name: string, class_asset_path: string, class_root: string, class_root_is_base_library: bool }] }
set_blueprint_breakpoint¶
Destructive Idempotent
Add an enabled Blueprint debugger breakpoint on one node of a Blueprint's function or event graphs, found by its title, so execution pauses there in the editor's Blueprint debugger the next time Play-in-Editor reaches it. It changes editor debug state only: the asset is not modified or saved, and there is no undo step. Idempotent: a node that already has a breakpoint answers already_existed true. The first node whose title contains node_name is used (function graphs first, then event graphs; macro graphs are not searched), so pass a distinctive part of the title; no matching node answers found_in_graph false and breakpoint_set false rather than an error. Inverse: remove_blueprint_breakpoint; find node titles with get_graph_nodes. A Blueprint that does not resolve, an asset that is not a Blueprint, or a bare name matching several Blueprints is an error.
| Parameter | Type | Required | Description |
|---|---|---|---|
blueprint_path |
string | yes | Blueprint to debug: object path, package path (e.g. "/Game/BP/BP_Door") or bare asset name (e.g. "BP_Door"); a bare name matching several Blueprints is an error that lists them. |
node_name |
string | yes | Part of the node title as the graph shows it, e.g. "Print String" or "Event BeginPlay"; matched case-insensitively against node titles (not object names), first match wins. |
Returns: { blueprint_path: string, node_name: string, breakpoint_set: bool, already_existed: bool, found_in_graph: bool, node_class?: string, node_title?: string }
validate_asset¶
Read-only
Run the editor's enabled data validators (the Data Validation plugin, in its Script use case) on one asset and report the verdict, without changing or saving it (the asset gets loaded): validation_result is Valid, Invalid or NotValidated (no validator applies to that asset), is_valid is false only for Invalid, and errors and warnings carry the validators' messages. Use it to check one asset after editing it, e.g. before a commit or a cook; for a whole folder use validate_assets_in_path, to see which validators exist list_validators, and for a level's actors run_map_check. validators_run counts the validators that actually validated this asset (returned a result other than NotValidated), validators_applied names their classes, and validators_enabled counts every enabled validator; none run when the asset's own class-level check already finds it Invalid. An asset the Asset Registry cannot find, or the Data Validation plugin being off, is an error.
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_path |
string | yes | Asset to validate, as an object path ("/Game/MyGame/M_Example.M_Example") or a package path ("/Game/MyGame/M_Example", which names its primary asset). |
Returns: { asset_path: string, resolved_object_path: string, validation_result: string, is_valid: bool, errors: [string], warnings: [string], error_count: number, warning_count: number, validators_run: number, validators_applied: [string], validators_enabled: number }
validate_assets_in_path¶
Read-only
Run the enabled editor data validators (Script use case, as validate_asset does) on every asset under a content path, recursively by default, up to max_results assets; truncated tells when more were found. Loads each asset but changes and saves nothing. Per asset: validation_result (Valid, Invalid or NotValidated), is_valid (NotValidated counts as valid), errors and warnings; totals in num_valid, num_invalid and num_not_validated. A path with no assets returns zero counts, not an error. Use validate_asset for one asset, list_validators to see which validators run.
| Parameter | Type | Required | Description |
|---|---|---|---|
path |
string | yes | Package path to scan, e.g. "/Game/MyGame". |
recursive |
boolean | no | Whether to scan sub-paths (optional, default true) |
max_results |
number | no | Maximum number of assets to validate (optional, default 1000, valid 1-100000) |
Returns: { path: string, recursive: bool, num_assets: number, num_valid: number, num_invalid: number, num_not_validated: number, total_found: number, truncated: bool, results: [{ asset_path: string, asset_name: string, asset_class: string, validation_result: string, is_valid: bool, error_count: number, warning_count: number, errors: [string], warnings: [string] }] }
watch_pie_property¶
Destructive
Sample one or SEVERAL properties across a PIE session, arming BEFORE PIE starts so a write that happens in BeginPlay is still observable. Answers "what did this value do during play", NOT "who wrote it": it SAMPLES rather than intercepting writes, so identifies_writer is always false and a transient A->B->A between two samples is invisible. THE ORDER MATTERS: action="start" arms and returns immediately (it cannot block the game thread), THEN you start PIE, and afterwards action="status" returns the recorded samples. Arming while PIE is ALREADY running is honoured but flagged (armed_while_pie_running) -- the BeginPlay window has already passed for that session, which is precisely the failure this tool exists to avoid, so stop PIE, arm, then start PIE. It self-disarms on duration_seconds or max_samples (it can never leak a ticker) and the recorded samples survive until action="clear".
| Parameter | Type | Required | Description |
|---|---|---|---|
action |
string | no | Optional: "start" (default) | "status" | "stop" | "clear" | "list". |
property_name |
string | no | Property to sample on the matched object. Required for "start" unless properties is given. |
properties |
array | no | Optional array of property names sampled TOGETHER, in the SAME tick, as one ROW. This is what answers correlation questions ("movement_mode changed in the same tick immersion crossed the threshold"), which N separate watches cannot: each would dedupe on its own clock and the columns would not line up. The row is the dedup unit -- if ANY field changes the whole row is recorded -- and each sample carries a values object with the per-property breakdown. With one property there is no values object. |
class_name |
string | no | Optional actor class filter (exact UClass name; a Blueprint class needs the "_C" suffix). At least one of class_name / actor_label is required for "start". |
actor_label |
string | no | Optional actor filter, matched against the editor label OR the object name. |
component |
string | no | Optional component name: sample the property on that component of the matched actor instead of on the actor. |
sample_interval_seconds |
number | no | Optional periodic sampling interval (default 0.1, min 0.01). |
duration_seconds |
number | no | Optional auto-disarm after this many real seconds (default 300; 0 = no time cap, disarms only on max_samples or an explicit stop). |
max_samples |
integer | no | Optional hard cap on recorded samples (default 400). |
watch_id |
integer | no | Target watch for "status" / "stop" / "clear" (omit = all of them). |
Returns: { action: string, watch_id?: int, armed?: bool, watches: [{ watch_id, property_name, class_name, actor_label, component, sample_interval_seconds, duration_seconds, max_samples, active, saw_pie_world, armed_while_pie_running, sample_count, elapsed_real_seconds, stop_reason, distinct_objects_seen, samples?: [{ phase, object_path, actor_label, value_text, value, elapsed_real_seconds, world_time_seconds, world, changed_from_previous }] }], identifies_writer: bool, sampling_only: bool, armed_pre_pie?: bool, pie_running?: bool, class_resolved?: bool, hint?: string, world_name: string|null, world_package: string|null, world_type: string|null, net_mode: string|null, pie_instance: number }. The five world_* / net_mode / pie_instance fields identify the PIE world the ticker is sampling AT THE MOMENT OF THE CALL (all null / pie_instance -1 when no PIE session is running, which is the normal state right after arming).