---
title: Command buffer debugging
framework: metal
role: collectionGroup
role_heading: API Collection
path: metal/command-buffer-debugging
---

# Command buffer debugging

Properties and methods for programmatically debugging runtime issues with a command buffer.

## Topics

### Identifying the command buffer

- [label](metal/mtlcommandbuffer/label.md)
- [commandQueue](metal/mtlcommandbuffer/commandqueue.md)
- [device](metal/mtlcommandbuffer/device.md)

### Grouping commands within a GPU frame capture

- [pushDebugGroup(_:)](metal/mtlcommandbuffer/pushdebuggroup(_:).md)
- [popDebugGroup()](metal/mtlcommandbuffer/popdebuggroup().md)

### Getting error details

- [error](metal/mtlcommandbuffer/error.md)
- [errorOptions](metal/mtlcommandbuffer/erroroptions.md)
- [MTLCommandBufferEncoderInfo](metal/mtlcommandbufferencoderinfo.md)
- [MTLCommandBufferEncoderInfoErrorKey](metal/mtlcommandbufferencoderinfoerrorkey.md)

### Reading the runtime message logs

- [logs](metal/mtlcommandbuffer/logs-518l2.md)

### Checking scheduling times on the CPU

- [kernelStartTime](metal/mtlcommandbuffer/kernelstarttime.md)
- [kernelEndTime](metal/mtlcommandbuffer/kernelendtime.md)

### Checking execution times on the GPU

- [gpuStartTime](metal/mtlcommandbuffer/gpustarttime.md)
- [gpuEndTime](metal/mtlcommandbuffer/gpuendtime.md)

### Determining whether to maintain strong references

- [retainedReferences](metal/mtlcommandbuffer/retainedreferences.md)

## See Also

### Troubleshooting a command buffer

- [status](metal/mtlcommandbuffer/status.md)
- [MTLCommandBufferStatus](metal/mtlcommandbufferstatus.md)
