# 4. Frame Debugger and GPU
Part of [[Profiling and Optimization]]. Previous: [[3. Memory Profiler Snapshots]]. Next: [[5. Profile Analyzer and Related Tools]].
> [!note] Verification status
> Frame Debugger flow (**Window > Analysis > Frame Debugger**, Enable, target selector, event hierarchy, event information) was checked against the 6000.5 "Debug a frame" page and window reference on 2026-11-10. Render Graph frames show a parent event `ExecuteRenderGraph` and child events named with `(RP:…)` for render pass / subpass. The Frame Debugger shows only render passes that contain a draw call. **No live frame was captured.**
## 4.1 When to open it
The CPU Profiler says you are waiting on the GPU, or the Rendering module shows too many setpass calls / batches, or a Quest capture is fill-rate bound. The Frame Debugger answers **which draws, in which order, to which target**.
It is also a teaching tool even when you are not "debugging": it is the best picture of how URP actually assembled the frame ([[URP Shaders and Shader Graph]], [[Lighting and Baking]]).
## 4.2 Capture a frame
1. **Window > Analysis > Frame Debugger** (also reachable from the Game view control bar).
2. Set the **target** to Editor, or attach to a built Player (the 6000.5 manual has a topic for attaching to a built project).
3. Click **Enable**. The application pauses. The event hierarchy fills with the draws and other events that made this frame. The Game view shows the frame constructed up to the selected event.
4. Step with the scrubber, the previous/next buttons, or the arrow keys. When an event belongs to a GameObject, the Hierarchy highlights it.
5. If the event renders into a **RenderTexture**, the Game view and the debugger show that target — this is how you watch a G-buffer, a shadow map, or a post-process ping-pong build up.
Disable when you are done; the player stays paused until you do.
## 4.3 Render Graph (URP / HDRP)
If the project uses the **Render Graph** system (URP's path in Unity 6), the hierarchy is grouped as:
- A parent event named `ExecuteRenderGraph`
- Children named with a render-pass and subpass index, in the form the 6000.5 manual describes as `(RP:…)`
Only passes that contain a **draw call** appear. A compute-only or empty pass may be invisible here. If you are writing a custom Renderer Feature, the Frame Debugger is how you confirm your pass actually drew, and into the right texture.
## 4.4 What "too many draws" looks like
Walk the list and ask:
- **Is this object even visible?** A shadow caster, a reflection probe pass, or a hidden UI toolkit panel can surprise you.
- **Are materials breaking batches?** Every unique material / keyword / light combination can split a batch. The SRP Batcher is more tolerant than the old static batcher, but a unique material per prop still hurts, especially on Quest ([[5.Quest 2 Performance and Rendering]]).
- **Transparent overdraw?** Look at Scene view **Overdraw** mode (Meta's performance page recommends it). Saturated regions are pixels shaded many times. Particles, unoptimized foliage and full-screen fades are frequent offenders ([[Particle Systems and Layered Effects]], [[VFX Graph]]).
- **Post-processing?** A stack of volume effects is extra full-screen passes. The Post-Processing tutorial later in this queue covers the cost, especially on Quest.
The Rendering module's "batches" and "setpass calls" are the numeric version of this walk. Use both.
## 4.5 GPU Profiler vs Frame Debugger
| Tool | Good for |
|---|---|
| GPU module in the Profiler | "Was this frame GPU-bound, and by how much?" |
| Frame Debugger | "Which event was it?" |
| Platform tools (RenderDoc, OVR Metrics, Mali / Snapdragon tools) | "What did the hardware actually do?" on device |
The Unity GPU profiler's draw-call total can disagree slightly with platform tools because of profiling overhead. Meta says to use it comparatively, not as a courtroom number. For Quest, OVR Metrics and a RenderDoc capture on device close the loop (part 6).
## Official docs
- Debug a frame (6000.5): https://docs.unity.com/en-us/engine/6000.5/manual/analysis/graphics-performance-profiling/profile-rendering/frame-debugger/debug
- Frame Debugger window reference: https://docs.unity3d.com/6000.5/Documentation/Manual/frame-debugger-window.html