Skip to content
Tutorials Center
My learning

Topics

Lesson 38 of 38 ยท Projects and Practice

Practice: Debugging Checklist and Interview Questions

Practice Unreal Engine skills. A step-by-step debugging checklist, common crash causes, logging and breakpoints, and interview questions with short answers on Actors, GC, Blueprints and performance.

Knowing the features is half of working with Unreal Engine; the other half is finding out why something does not work. This closing lesson gives you a systematic debugging routine, a list of the problems you will meet most often, and interview-style questions to test yourself.

The Unreal Editor is not available on this site, so the debugging tools are described in words and the C++ is read-only. The Python stand-ins turn the checklists into small tools you can extend for your own projects.

A debugging routine

Do not guess. Work through the same steps every time:

  1. Reproduce. Find the shortest steps that make the problem happen, in a repeatable way.
  2. Read the log. Open Window > Developer Tools > Output Log. The first Error or Warning is usually the real one. Filter by category (LogTemp, LogBlueprintUserMessages, LogAnimation).
  3. Check the obvious. Is the right game mode set? Is the Actor in the level? Is it hidden, disabled or at the wrong location?
  4. Narrow down. Disable half of the system, or add a Print String / UE_LOG line, and see which half contains the bug.
  5. Inspect live. Use the debugger or the in-editor tools below.
  6. Fix one thing, retest, and write down the cause.

Logging in C++

C++
DEFINE_LOG_CATEGORY_STATIC(LogCoinRush, Log, All);

UE_LOG(LogCoinRush, Warning, TEXT("Coin %s collected by %s, value %d"),
       *GetName(), *GetNameSafe(Other), Value);

if (GEngine)
{
    GEngine->AddOnScreenDebugMessage(-1, 3.f, FColor::Yellow,
        FString::Printf(TEXT("Score: %d"), Score));
}

Rules to remember: %s expects *FString (the dereference operator), not FString itself; GetNameSafe handles null pointers. Use Verbose for chatty messages and filter them with Log LogCoinRush Verbose in the console. Debug draws help for spatial bugs: DrawDebugSphere, DrawDebugLine and DrawDebugString.

Tools for live inspection

  • Blueprint debugger: set a breakpoint (F9) on a node, play, and step through. Hover a pin for its value. Use the Watch feature to track a variable.
  • Visual Studio / Rider debugger: attach to the editor (or launch with debugging), set breakpoints in C++ and inspect variables. Build in DebugGame Editor to see variables that are optimized away in Development.
  • World Outliner and Details panel during PIE: press F8 to eject from the player, select Actors and read live values. This often reveals a mis-set property at once.
  • Console commands: showdebug, stat unit, ke * list, obj list class=Actor and viewmode wireframe.
  • Gameplay Debugger (apostrophe key): AI, perception and navigation (see AI perception and navigation).
  • Visual Logger: records events over time and lets you scrub back through a session.
  • Unreal Insights and the stat commands for performance (see Profiling and stat commands).

The usual suspects

Symptom Typical causes
Crash with access violation Null pointer; unreflected UObject* after garbage collection (Memory and garbage collection); using an Actor after Destroy()
Overlap or hit event never fires Collision responses not set to overlap/block; Generate Overlap Events off; event bound before the component exists
Input does nothing Mapping context not added; player controller not possessing the pawn; UI has captured input
Blueprint variable resets Editing the instance vs class default; Transient flag
Cast fails Wrong game mode, pawn or controller class set in Project Settings or World Settings
Works in editor, fails in package Asset not cooked (soft reference); default map unset; editor-only code
Changes to C++ header do nothing Live Coding cannot apply reflection changes; close the editor and rebuild
Animation does not play Slot node missing; wrong skeleton; Animation Mode not set to Use Animation Blueprint
AI never moves No Nav Mesh Bounds Volume; no AI Controller; behavior tree never started
Python Stand-in: a symptom lookup tool

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Parsing logs

A log can be large. Filtering by severity quickly highlights the real problem. This stand-in does what the Output Log's filter box does, on a sample.

Python Stand-in: log filter

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The repeated "Accessed None" error is the one to fix first: it fires repeatedly, a common sign of a Blueprint reading a variable that was never set.

Interview questions

Try to answer each one in your head before reading the line below it.

What is the difference between an Actor and a Component? An Actor is an object that can be placed in a level; Components are pieces of functionality attached to an Actor (mesh, collision, movement). Prefer composition: build behavior from components.

What is the difference between a Pawn and a Character? A Pawn is any Actor a controller can possess. A Character is a Pawn with a skeletal mesh, a capsule and a CharacterMovementComponent for walking, jumping and falling.

Where do the game rules belong: GameMode, GameState, PlayerState or PlayerController? Rules live in the GameMode (server only). Shared match state to replicate lives in GameState. Per-player replicated data (score, name) lives in PlayerState. The PlayerController handles input and the UI for one player.

Why mark a UObject* member with UPROPERTY? So the garbage collector sees the reference and the object is not destroyed while still in use.

What does Super::BeginPlay() do and why call it? It runs the parent's version, which initializes components and base behavior. Skipping it can break engine functionality.

Blueprint or C++? Use C++ for core systems, performance-critical code and reusable base classes; use Blueprints for content, tuning and quick iteration. A common architecture is C++ base classes with Blueprint subclasses.

How do you make code frame-rate independent? Multiply per-frame changes by DeltaTime (or use movement components and timers).

What is a delegate? A type-safe, bindable function pointer; dynamic multicast delegates can be bound in Blueprints and let objects react without knowing each other.

What is the difference between Static, Stationary and Movable lights? Static is fully baked; Stationary has fixed position and baked indirect light with dynamic shadows; Movable is fully dynamic.

Name three ways to reduce draw calls. Instancing (ISM/HISM), merging meshes, fewer materials per mesh, culling distant objects, and Nanite for supported geometry.

How do you find out whether a game is CPU or GPU bound? Run stat unit and compare Game, Draw and GPU times; the largest one is the bottleneck.

What does cooking do? Converts assets to platform-specific formats before packaging.

Python Stand-in: flashcard quiz

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Practice tasks

  1. Break a project on purpose: unset the default map, package, and read the result. Fix it.
  2. Create an Actor that destroys itself after 5 seconds with a timer. Make it crash by leaving an unreflected pointer, then fix it with TWeakObjectPtr.
  3. Add stat unit readings for three different scenes and decide the bottleneck in each.
  4. Rebuild the patrolling enemy but replace the behavior tree with a State Tree or a Blueprint state machine, and compare how it feels to edit.
  5. Read your own Output Log after a session and fix every warning.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. In the Output Log, which message should you usually fix first?

    Early or repeated errors are commonly the root cause of many follow-up problems.
  2. 2. A package works in the editor but a texture is missing in the build. What is a likely cause?

    Assets only loaded by soft path or name must be added to the cook lists.
  3. 3. After changing a UPROPERTY in a header, Live Coding does not apply the change. What should you do?

    Reflection layout changes need a full build and editor restart.
  4. 4. Who owns the match rules in a typical single-player game?

    The GameMode defines rules such as scoring and win conditions.

Summary

  • Debug by reproducing, reading the Output Log, narrowing down, inspecting live and fixing one thing at a time.
  • Use UE_LOG, on-screen messages, debug draws, breakpoints and the Gameplay Debugger.
  • Most issues fall into a handful of patterns: null or dangling pointers, collision setup, missing mapping contexts, uncooked assets and missing Nav Meshes.
  • Know the core vocabulary (Actor, Component, Pawn, Character, GameMode, GC, delegates, lights, cooking) and be able to explain it simply.

You have reached the end of this part of the course. Return to the Unreal Engine track page to review earlier chapters, then keep building: every project you finish teaches more than any lesson.

Next: Unreal Engine track overview