SuperAPI AI Directory

unity-debug

Testing & quality

View repository

Updated 10-15 17:25

About this skill

Before calling any skill in this module: if you are about to call a skill with parameters guessed from its name or description, STOP — read this file (or fetch its schema via GET /skills/recommend?includeSchema=true) first. If you already have the parameter definitions from recommend/schema, you may proceed straight to dryRun.

Triggers

  • Diagnosing compile failures
  • Checking errors after a change
  • Forcing recompilation
  • Gathering system diagnostics
  • Diagnose compilation failures, check for errors after changes, force recompilation, collect system diagnostics
Debug Skills

Debug utilities for error checking and diagnostics.

Operating Mode

  • Approval: read-only skills (unity_diagnose / debug_get_errors / debug_get_logs / debug_check_compilation / debug_get_system_info / debug_get_stack_trace / debug_get_assembly_info / debug_get_defines / debug_get_memory_info, all marked SkillMode.SemiAuto) execute directly;debug_force_recompile / debug_set_defines defaults to SkillMode.FullAuto, requires user grant, and executes in one step after grant, returning the result.
  • Auto / Bypass: execute directly.
  • This module contains high-risk Reload-type skills:debug_force_recompile(marked MayTriggerReload=true) that will inevitably trigger a Domain Reload;debug_set_defines modifying PlayerSettings 's scripting defines will also trigger recompilation — these skills will be IsForbiddenInSemi automatically intercepted under Approval / Auto,and can only execute when matched by Bypass or Allowlist, and after invocation the server will be briefly unavailable.

DO NOT (common hallucinations):

  • debug_compile / debug_recompile do not exist → use debug_force_recompile
  • debug_run does not exist → use editor_play (editor module)
  • debug_clear does not exist → use console_clear (console module)
  • debug_set_defines triggers Domain Reload — server will be temporarily unavailable

Routing:

  • For runtime console logs → use console module's console_get_logs / console_start_capture
  • For play mode control → use editor module
  • For script compile feedback → use script module's script_get_compile_feedback

Skills

unity_diagnose

Aggregated Editor health snapshot — call this FIRST when triaging problems. Combines console errors, compile state, recent workflow tasks, recent jobs, and server stats in a single response. Avoids chaining 4-5 individual skills.

Parameters:

  • errorLimit (int, optional, default 20, range 1-200): Max console entries to return.
  • includeWarnings (bool, optional, default true): Include warnings (false = errors only).
  • includeRecentJobs (bool, optional, default true): Include the 10 most recent async jobs.

Returns: { summary: { healthy, consoleErrorCount, consoleWarningCount, isCompiling, serverRunning, hint }, compile, console, workflow, server, recentJobs }

debug_get_logs

Get console logs filtered by type and content. Parameters:

  • type (string, optional): Filter by type (Error/Warning/Log/All, case-insensitive; a value naming none of them is rejected with SEMANTIC_INVALID). Default: Error.
  • filter (string, optional): Filter by content.
  • limit (int, optional): Max entries. Default: 50.

debug_get_errors

Get only active errors and exceptions from console. Parameters:

  • limit (int, optional): Max entries. Default: 50.

debug_check_compilation

Whether Unity is compiling right now, and whether the last finished compilation succeeded. Parameters: None. Returns: {isCompiling, isUpdating, lastCompilation: {succeeded, errorCount, finishedAtUtc, errors: [{file, line, message}]}} — lastCompilation is null until a compilation finishes in this editor session. isCompiling: false alone never means the last compile succeeded: after a failed compile Unity keeps running the old assemblies.

debug_force_recompile

Force Unity to recompile all scripts. Parameters: None.

debug_get_system_info

Get system and Unity environment information. Parameters: None.

debug_get_stack_trace

Get stack trace for a log entry by index.

Parameter Type Required Default Description
entryIndex int Yes - Index of the log entry to retrieve stack trace for

Returns: { index, message, stackTrace }

debug_get_assembly_info

Get project assembly information.

Parameters: None.

Returns: { success, count, assemblies }

debug_get_defines

Get scripting define symbols for current platform.

Parameters: None.

Returns: { success, buildTargetGroup, defines }

debug_set_defines

Set scripting define symbols for current platform.

Parameter Type Required Default Description
defines string Yes - Scripting define symbols to set

Returns: { success, buildTargetGroup, defines, serverAvailability }

debug_get_memory_info

Get memory usage information.

Parameters: None.

Returns: { success, totalAllocatedMB, totalReservedMB, totalUnusedReservedMB, monoUsedSizeMB, monoHeapSizeMB }


Exact Signatures

Exact names, parameters, defaults, and returns are defined by GET /skills/schema or unity_skills.get_skill_schema(), not by this file.