16 - Debugging

 

1. Animation Debug

These are useful for visualizing animation nodes, blend spaces, and skeletal data.

CommandPurpose
ShowDebug AnimationShows skeletal mesh animation debug info (bones, active anim BP nodes).
a.AnimNode.OrientationWarping.Debug 1Debug Orientation Warping nodes.
a.AnimNode.StrideWarping.Debug 1Debug Stride Warping.
a.AnimNode.AimOffsetLookAt.Debug 1Debug AimOffset LookAt.
a.AnimNode.LegIK.Debug 1Debug Leg IK solver.
a.DebugDrawSockets 1Show skeletal mesh sockets in the viewport.
a.DebugDrawBoneNames 1Displays bone names in the viewport.
ShowDebug ToggleSubCategory <Category>Show a specific animation debug category.

2. Capsule & Collision Debug

CommandPurpose
Show CollisionDisplays collision shapes including capsule.
pxvis collisionPhysX visualization of collisions (UE4).
p.VisualizeComponentShapes 1Show collision shapes of components.
p.CapsuleSweepDebug 1Visualizes capsule sweeps.
ShowDebug CollisionDisplays collision info in text format.

3. Raytrace / Traces Debug

CommandPurpose
pxvis traceShows line traces (UE4 PhysX).
p.VisualizeTraces 1Shows physics traces in-world.
p.LineTraceDrawTime <Seconds>Keeps traces visible for a set time.
DrawDebugLine / DrawDebugSphere (BP or C++)Manual debug drawing.

4. Vector & Transform Debug

CommandPurpose
ShowDebug VectorsShows velocity vectors for actors.
p.VisualizeMovement 1Draws movement vectors and paths.
p.DebugDrawProjectile 1Shows projectile velocity vectors.

5. Time & Motion Debug

CommandPurpose
slomo <value>Slow motion (e.g., slomo 0.1 for 10% speed).
t.MaxFPS <value>Limit FPS for slow-mo debugging stability.
p.VisualizeAsyncScene 1Show async physics scene updates.

Core “ShowDebug” workflow (text HUD)

  • ShowDebug → lists all available categories in your build.

  • ShowDebug Animation → anim BP, montage, root-motion, active states, curves, notifies.

  • ShowDebug Character → CharacterMovement (speed, accel/vel, movement mode, root-motion status).

  • ShowDebug ToggleSubCategory <name> → filter a category (use autocomplete after typing).

  • NextDebugTarget / PreviousDebugTarget (PGUP/PGDOWN by default) → cycle the actor being debugged.

  • ShowDebug again (or ShowDebug None) → turn off.


Skeletal/Anim-node specific CVars

These draw on top of the viewport; they only show if that node actually evaluates this frame.

  • a.AnimNode.OrientationWarping.Debug 1

  • a.AnimNode.StrideWarping.Debug 1

  • a.AnimNode.AimOffsetLookAt.Debug 1

  • a.AnimNode.LegIK.Debug 1

  • (Tip) Type a.AnimNode. then press Tab to see all node debug CVars available in your build.

  • Perf counters: stat anim, stat skeletalmesh, stat game, stat physics, stat gpu


Capsule / Collision (your most asked)

  • All collisions (easy global toggle): show collision

  • Player-collision viewmode: viewmode collision (type again to return to Lit)

  • Per-component collision shapes (good for capsules): p.VisualizeComponentShapes 1

  • Chaos physics (UE5):

    • Enable debug layer: p.Chaos.DebugDraw.Enabled 1

    • Collisions: p.Chaos.DebugDraw.DrawCollisions 1

  • Quick text readout: ShowDebug Collision

If you only care about the pawn capsule, also run ShowDebug Character. You’ll see radius/half-height and queries.


Traces / Raycasts (line/sweep)

Blueprint nodes already have this built in:

  • On any Trace/Sweep node set Draw Debug Type: For One Frame, For Duration, or Persistent.

  • Use Draw Time input to control how long traces stay visible.

Code/console helpers:

  • Visual Logger (timeline with traces/locations): open Window ▸ Developer Tools ▸ Visual Logger (or call UVisualLoggerKismetLibrary::StartRecording in BP/C++).
    Give your trace a Trace Tag so it’s searchable in VisLog.


Movement vectors & trajectories

  • Character velocity/accel vectors in world: p.VisualizeMovement 1

  • Character HUD readout (speed/vel/accel): ShowDebug Character

  • AI path & steering (for animation steering/walk): press ` (apostrophe) to open Gameplay Debugger, then enable the AI category.


Control Rig / IK Rig / Retargeting

  • Control Rig & IK Rig primarily use per-node Draw Debug checkboxes.
    In Sequencer/Preview, enable Debug Draw on the Control Rig asset or on individual nodes (e.g., FABRIK/CCD/FBIK solvers) to see axes, effectors, pole vectors.

  • Retargeter preview: in the IK Retargeter editor, enable Draw Chains / Goals / Debug Pose from the viewport toolbar.


Root Motion / Notifies / Curves quickies

  • ShowDebug Animation → shows RootMotion mode, Montage position, Active Notifies, Curve values.

  • In Persona/Anim Preview: use Viewport ▸ Show ▸ Bones / Bone Names / Sockets / Curves to verify authoring.


Cloth & Rigid Bodies (Chaos)

  • Cloth overview: stat chaoscloth

  • Cloth debug draw: p.ChaosCloth.DebugDraw 1 (toggles wire, constraints, normals—sub-options depend on engine version)

  • Rigid body debug (see above): p.Chaos.DebugDraw.Enabled 1, p.Chaos.DebugDraw.DrawCollisions 1


Timing tools (to study pose changes)

  • Slow motion: slomo 0.1 (10% speed)

  • Clamp FPS for stable stepping: t.MaxFPS 10

  • Step one frame (PIE): Step (bind it or use the Editor toolbar frame step)


Useful viewport “ShowFlag” toggles (when you need a render-layer view)

(Names vary slightly by version; use autocomplete after typing showflag.)

  • showflag.bones 1 / 0

  • showflag.bonenames 1

  • showflag.sockets 1

  • showflag.collision 1

  • showflag.motiontrajectories 1 (if Motion Trajectories is enabled)


Logging (when the HUD isn’t enough)

  • Raise verbosity at runtime: Log LogAnimation Verbose (or VeryVerbose)

  • Common categories: LogAnimation, LogRootMotion, LogAnimMontage, LogIKRig, LogPoseSearch (if using Motion Matching)


Power-user: discover everything in your build

  • Autocomplete: type a prefix (e.g., a.AnimNode. or p.Chaos.) then hit Tab to list.

  • Dump matching console commands:

    • DumpConsoleCommands a.AnimNode

    • DumpConsoleCommands ShowDebug

    • DumpConsoleCommands p.Chaos
      This prints all matches (with help text) to the Output Log.


Handy one-liners to bind in PIE

  • Bind keys via Input (Editor Preferences ▸ Keyboard Shortcuts) or run via BP Execute Console Command:

    • Toggle anim HUD: ShowDebug Animation

    • Toggle collisions: show collision

    • Toggle movement vectors: p.VisualizeMovement 1 / 0

    • Slowmo: slomo 0.25


Quick answers to your specific ask

  • Capsule: show collision (global) or p.VisualizeComponentShapes 1 (per-component shapes, great for capsule).

  • Raytrace: set Draw Debug Type on the Trace/Sweep nodes (For Duration + Draw Time). For recorded timelines, use Visual Logger.

  • Vectors: p.VisualizeMovement 1 (shows velocity/accel vectors from CharacterMovement) + ShowDebug Character for numeric readouts.

To check velocity


To Draw a capsute and the vector forward


You place this on even tick and its going to create the preview of the capsule collider and a arrow. For the arrow you need to add an object for the end of the line to point to. In this example I place a sphere collider called "arrowlocat".

How do you do that sphere collider thing? You go do the character BP(Blue icon one) and you add there the sphere collider. 


https://dev.epicgames.com/documentation/en-us/unreal-engine/blueprint-debugging-example-in-unreal-engine

Comments