---
title: Inspecting live resources at runtime
framework: xcode
role: article
role_heading: Article
path: xcode/inspecting-live-resources-at-runtime
---

# Inspecting live resources at runtime

Validate your resources by viewing the contents of your textures and buffers while debugging your Metal app.

## Overview

Overview You can preview contents of textures and buffers while debugging your app in Xcode by pausing on a breakpoint, inspecting a variable that references the resource, and then clicking the Preview button. This is one quick way to validate that your resources have the correct contents while debugging at runtime. important: If you disable GPU Frame Capture, you can’t inspect resource content while your app is running. See Capturing a Metal workload in Xcode to learn how to reenable it. Inspect your textures and buffers First, pause the app inside a scope that contains a variable referencing the resource. You can achieve this by setting a breakpoint on a line that references the resource. To set a breakpoint, click the line number to the left of the source editor. The example below shows a breakpoint for the line where _skyMap is bound to the render encoder:

Then, when yor app pauses at the breakpoint, move the pointer over the variable referencing the resource to reveal the Value inspector.

Finally, click the Preview button to show the contents of the resource.

If the resource is a texture and has multiple slices, like the sky map above, you can drag the slider at the bottom of the Preview popover to see each slice. If the resource has any unexpected values, you can investigate further with the Metal debugger (see Investigating visual artifacts).

## See Also

### Runtime diagnostics

- [Validating your app’s Metal API usage](xcode/validating-your-apps-metal-api-usage.md)
- [Validating your app’s Metal shader usage](xcode/validating-your-apps-metal-shader-usage.md)
- [Monitoring your Metal app’s graphics performance](xcode/monitoring-your-metal-apps-graphics-performance.md)
- [Customizing the Metal Performance HUD](xcode/customizing-metal-performance-hud.md)
- [Understanding the Metal Performance HUD metrics](xcode/understanding-metal-performance-hud-metrics.md)
- [Gaining performance insights with the Metal Performance HUD](xcode/gaining-performance-insights-with-metal-performance-hud.md)
- [Generating performance reports with the Metal Performance HUD](xcode/generating-performance-reports-with-metal-performance-hud.md)
