Mac hosting guide

Debug Metal Shaders Remotely on a Rented Mac

Enable GPU Frame Capture in the scheme, run the app on an Apple silicon Mac, and capture a frame from the Xcode debug bar. We have not measured Metal debugging inside a VM, so test on the Dedicated M4 Pro 48 GB, a whole Mac by the month.

Figment editorial teamPublished Updated Facts checked November 10, 2026

Figment Mac plans

US East. Pay before use. Hourly and daily too.

Intel Mac VM4 shared vCPUs, 4GB RAM, 80GB SSD$25per monthApple Silicon Mac VM4 shared vCPUs, 4GB RAM, 65GB SSD$39per monthDedicated M4 Pro12-core CPU, 24GB RAM, 512GB SSD$199per month

Minimum first purchase: $25 of account credit, used for your rental.

To debug a Metal shader, turn on GPU Frame Capture in your scheme, run the app on an Apple silicon Mac, capture a frame from the Xcode debug bar, then open the shader debugger on the draw call that looks wrong. Both tools live in the Xcode GUI, as described in Apple's Metal debugger documentation, so you reach them over encrypted remote desktop.

We have not measured Metal or GPU debugging inside a Figment VM. If you need it, rent the Dedicated M4 Pro 48 GB by the month ($349, cancel any time) and run your own capture in the first days.

Which Mac do I need to debug Metal shaders?

An Apple silicon Mac, and for this task we recommend the Dedicated M4 Pro (whole Mac: M4 Pro, 48GB RAM, 512GB SSD). The shader debugger and GPU Timeline view are built around Apple's GPUs, which in practice means Apple silicon. The Intel Mac VM cannot run Apple silicon-only tools, and the Apple Silicon Mac VM is untested for GPU capture by us. A whole Mac with no other customer on it removes the one variable we cannot vouch for.

Xcode on an Intel Mac can still compile and sign Metal code for other targets, so the Intel Mac VM ($25 a month) remains fine for the non-GPU parts of a pipeline, on Xcode 26.3 or earlier.

What do I set up before capturing?

Confirm each item in this table before you press the capture button. The details come from Apple's guide to capturing a Metal workload in Xcode.

ItemWhere to set itNotes
GPU Frame Capture enabledScheme → Run → Options → GPU Frame Capture: MetalRequired for the capture button to appear
Metal API ValidationScheme → Run → Diagnostics → Metal API Validation: EnabledSurfaces API misuse before you capture
Shader debug infoBuild Settings → MTL_ENABLE_DEBUG_INFO: Yes, with source map (Debug)Needed for line-level shader stepping
Capture scope (programmatic)MTLCaptureDescriptor.captureObject = device or command queueNarrow the capture to one queue when you can
GPU TimelineApple GPU onlyNot available on third-party GPUs

Keep MTL_ENABLE_DEBUG_INFO off for Release builds so symbols do not ship with your binary. If you need to debug an optimized build, archive the matching .metallibsym separately and keep it with your dSYMs. Menu wording and build-setting labels move between Xcode versions, so verify against the Xcode you have installed.

How do I connect to the Mac?

Open an encrypted remote desktop session from the Figment dashboard and sign in to Xcode with your Apple ID. Use a client with at least 24-bit colour so the debugger's heatmaps, buffer previews and attachment thumbnails render correctly. If the project lives in a remote repository, clone it from the Mac's terminal over SSH rather than copying a working tree through the viewer.

Network latency shows up as paint delay in the viewer, not as debugger inaccuracy. The captured frame is replayed locally on the Mac, so shader stepping does not depend on remote desktop round-trip time.

How do I trigger a capture?

Run the app on the Mac. The Metal capture button appears in the Xcode debug bar once a Metal command queue is detected; press it and Xcode records the next frame and opens the GPU Frame Capture view.

To trigger a capture programmatically from a specific frame in your renderer:

#if DEBUG
import Metal

func captureOneFrame(commandQueue: MTLCommandQueue) {
    let manager = MTLCaptureManager.shared()
    let descriptor = MTLCaptureDescriptor()
    descriptor.captureObject = commandQueue
    descriptor.destination = .developerTools

    guard manager.supportsDestination(.developerTools) else { return }
    do {
        try manager.startCapture(with: descriptor)
    } catch {
        NSLog("Metal capture failed: \(error)")
    }
}
#endif

Call MTLCaptureManager.shared().stopCapture() after the frame you want recorded ends. This example is illustrative, not a benchmark. Run it against your own renderer to confirm the capture appears in Xcode.

How do I find the draw call and shader?

Use the render pass tree in the left panel. Expand a pass to see its draw calls, pipeline states, and the vertex and fragment functions bound to each, then click the draw call that produces the pixels you are investigating.

  • Attachments shows colour and depth textures before and after the draw. Comparing them locates the corrupted region.
  • Bound Resources lists vertex buffers, textures and uniform buffers with their values. This is where you spot a wrong stride on an attribute buffer or a transposed matrix.
  • Geometry shows post-vertex-shader positions. If the error is in the vertex stage, the preview often makes it obvious.

How do I step through shader execution?

Click a shader function name in the pipeline state row. Xcode opens the shader debugger with MSL source and a thread picker at the top.

  1. Pick a thread: a pixel coordinate for fragment shaders or a vertex index for vertex shaders. For a vertex offset bug, choose the index you suspect.
  2. Step line by line. Each line shows the computed value of every variable in that thread.
  3. Click a variable to expand its components. For a float4 position you can read x, y, z and w at the line that wrote them.
  4. Open an adjacent known-good thread and watch where the two diverge. This usually points directly at the wrong input.

How do I analyse stalls and intermittent errors?

Open Instruments, choose the Metal System Trace template, attach to your app process on the Mac and record a few seconds of rendering. The trace shows GPU work duration and gaps, vertex and fragment stage execution on Apple silicon, and per-draw occupancy.

If a vertex pass and the fragment pass that consumes its output show an unexpected gap, it usually points at a missing barrier or fence between a compute write and a vertex read. Select the two encoders in the trace and read the dependency annotation Xcode inserts.

How long should a shader-debugging trial run?

For GPU Frame Capture and the shader debugger, start with a month of the Dedicated M4 Pro 48 GB ($349, cancel any time), and keep it if the workflow works for you. If a test of your own on the Apple Silicon Mac VM ($39 a month, $6 a day) shows it captures what you need, it is the cheaper long-term seat. Disconnecting does not stop billing, so stop an hourly or daily VM in Figment when you no longer need it.

Related guides:

Which Figment Mac fits this work?

Intel Mac VM from $25 a month, Apple Silicon Mac VM from $39, or a Dedicated M4 Pro for $199. Hourly and daily plans too. You pay before use, starting with at least $25 of account credit.

Choose a Mac plan