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:
Add a breakpoint to your code.
Control-click the breakpoint and choose Edit Breakpoint to open the GPU Capture dialog.
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.