ue-debugging-techniques

Diagnose Unreal Engine C++ and gameplay bugs using DrawDebug helpers, Visual Logger, Gameplay Debugger, and console commands.

55|5|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/kevinpbuckley/unreal-engine-skills --skill ue-debugging-techniques-kevinpbuckley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ue-debugging-techniques
Source: https://github.com/kevinpbuckley/unreal-engine-skills/tree/main/skills/core/ue-debugging-techniques
Command: npx skills add https://github.com/kevinpbuckley/unreal-engine-skills --skill ue-debugging-techniques-kevinpbuckley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Unreal Engine gameplay bugs—wrong values, bad positions, intermittent AI decisions, crashes—are hard to diagnose without knowing which built-in debugging tool fits the question. This Skill maps each class of bug to the correct UE 5.8 debugging mechanism and provides exact API signatures, macros, and engine source citations so an agent can instrument code correctly the first time. ## Core Features & Use Cases - World-space visualization: DrawDebugLine, DrawDebugSphere, DrawDebugCapsule, DrawDebugString, and other DrawDebug* helpers for rendering traces, detection ranges, and spawn points directly in the viewport. - Temporal event recording: UE_VLOG* macros and the Visual Logger for timestamped, per-actor timelines that can be scrubbed to replay intermittent or AI bugs. - Custom in-game overlays: Gameplay Debugger custom categories (FGameplayDebuggerCategory) with CollectData/DrawData replication for visualizing your own systems in PIE. - Runtime interrogation: GEngine->AddOnScreenDebugMessage, stat/showdebug console commands, cvar authoring, and native debugger guidance including Live Coding caveats. - Use Case: An AI character occasionally picks the wrong target after several seconds of play. Instrument the decision code with UE_VLOG_LOCATION and UE_VLOG_SEGMENT, record a session, then scrub the Visual Logger timeline to see exactly what the AI perceived at each moment. ## Quick Start Ask the agent to add debug visualization for a line trace in your Unreal C++ character class using the appropriate DrawDebug helper.

Frequently Asked Questions about ue-debugging-techniques

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

FAQPage Schema
How do I visualize a line trace in Unreal Engine C++?

Call DrawDebugLine with the world pointer, start and end points, color, and lifetime from any code with a UWorld*. Include DrawDebugHelpers.h; the call is automatically stripped in Shipping builds via ENABLE_DRAW_DEBUG.

How do I debug an intermittent AI bug in Unreal Engine?

Use the Visual Logger: record UE_VLOG text and spatial macros (UE_VLOG_LOCATION, UE_VLOG_SEGMENT) on the AI actor, then scrub the timeline in the Visual Logger window to replay exactly what the actor perceived and decided at each moment.

What is the difference between check and ensure in Unreal Engine?

check is a fatal assertion that crashes the process when the condition fails, while ensure logs the failure with a callstack and lets the editor keep running. Prefer ensure for non-fatal invariants in gameplay code to avoid losing unsaved work.

Does DrawDebug work in Shipping builds?

No. All DrawDebug* functions are guarded by ENABLE_DRAW_DEBUG, which evaluates to false in Shipping builds, so the calls compile to no-ops. Never rely on them for gameplay feedback in released games.

Why does Unreal crash after using Live Coding?

Live Coding cannot handle structural changes like adding UPROPERTY members, changing class layout, or editing headers that affect other translation units. Such changes leave stale CDOs or Blueprint instances, causing crashes; do a full editor restart and rebuild instead.

How do I add a custom category to the Gameplay Debugger?

Subclass FGameplayDebuggerCategory, implement CollectData and DrawData, then register it with IGameplayDebugger::RegisterCategory in your module's StartupModule. Guard all category code with WITH_GAMEPLAY_DEBUGGER and call SetupGameplayDebuggerSupport in Build.cs.