Capturing a Frame Using a Breakpoint

Capture a Metal frame at a breakpoint in your app by using Xcode's breakpoint actions.


While debugging your app, you may want to open the Metal debugger when control reaches a specific line of code. To capture a frame using an Xcode breakpoint:

  1. Add a breakpoint to your code.

  2. Control-click the breakpoint and choose Edit Breakpoint to open the GPU Capture dialog.

  3. Click the Add button (+) and choose Capture GPU Frame from the Action menu.

Now, when the debugger reaches the breakpoint, Xcode automatically performs a GPU capture.

An Xcode screenshot that shows a breakpoint, the breakpoint editor, and the Capture GPU Frame menu item.

See Also

Customizing Frame Capture

Enhancing Frame Capture by Using Labels

Assign meaningful labels to your Metal objects and commands so you can easily identify them in the call list of a captured frame.