<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShaders",
  "identifier" : "/documentation/MetalPerformanceShaders/MPSKernelOptions/insertDebugGroups",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Metal Performance Shaders"
    ],
    "preciseIdentifier" : "c:@E@MPSKernelOptions@MPSKernelOptionsInsertDebugGroups"
  },
  "title" : "insertDebugGroups"
}
-->

# insertDebugGroups

Enables calling kernel encode methods.

```
static var insertDebugGroups: MPSKernelOptions { get }
```

## Discussion

Using this option causes various kernel encode methods to call  <doc://com.apple.documentation/documentation/Metal/MTLCommandEncoder/pushDebugGroup(_:)> and <doc://com.apple.documentation/documentation/Metal/MTLCommandEncoder/popDebugGroup()> methods. The debug string will be drawn from the kernel’s [`label`](/documentation/MetalPerformanceShaders/MPSKernel/label) property, if available, or the name of the class otherwise.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)