unity-debug

Inspect Unity console errors, compilation state, stack traces, and system diagnostics.

Updated Jun 21, 2026
One-click install
npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-debug-du-qwq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-debug
Source: https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications/tree/main/.agents/skills/unity-skills/skills/debug
Command: npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-debug-du-qwq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When working in Unity, diagnosing why scripts fail to compile or why errors appear in the console often requires manually checking multiple editor windows. This Skill centralizes error reading, compilation checks, forced recompilation, and system diagnostics into a single callable interface. ## Core Features & Use Cases - Aggregated Health Snapshot: unity_diagnose combines console errors, compile state, recent jobs, and server stats in one call, making it the first step when triaging any problem. - Error & Log Inspection: Read console errors, filter logs by type or content, and retrieve stack traces for specific log entries. - Compilation Control: Check compilation status, force a full script recompile, and read or set scripting define symbols. - Use Case: After editing a C# script, ask the AI to check for compile errors; it calls debug_check_compilation and debug_get_errors, then reports the failing file and line with its stack trace. ## Quick Start Ask the AI to run a Unity health check with unity_diagnose and report any console errors and compilation problems.

Frequently Asked Questions about unity-debug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check Unity compilation errors from an AI assistant?

Call debug_check_compilation to see whether any compilation errors exist, then use debug_get_errors to list the active console errors. For a full picture in one call, use unity_diagnose, which combines compile state, console errors, and recent jobs.

How to force Unity to recompile all scripts programmatically?

Use debug_force_recompile, which triggers a full script recompilation. Note that it causes a Domain Reload, so the server becomes temporarily unavailable, and it requires Bypass or allowlist permission since it is blocked in semi-automatic modes.

What is the fastest way to diagnose Unity editor health?

Call unity_diagnose first. It returns an aggregated snapshot containing console error counts, compilation status, recent workflow tasks, recent async jobs, and server stats, avoiding the need to chain four or five individual diagnostic calls.

Can I read and modify Unity scripting define symbols?

Yes. debug_get_defines returns the scripting define symbols for the current build target group, and debug_set_defines replaces them. Be aware that setting defines modifies PlayerSettings and triggers a recompile with a Domain Reload.

Why is debug_force_recompile blocked in Approval or Auto mode?

Because it is marked MayTriggerReload and always causes a Domain Reload, making the server briefly unavailable. The IsForbiddenInSemi guard intercepts it in semi-automatic modes, so it only runs under Bypass or when explicitly allowlisted.

When should I use the console module instead of debug_get_logs?

Use the console module's console_get_logs or console_start_capture for runtime console log capture during play mode. The debug module focuses on error inspection, compilation state, and diagnostics rather than continuous runtime log streaming.