<!--
{
  "availability" : [
    "Xcode: 16.3.0 -",
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "XCUIAutomation",
  "identifier" : "/documentation/XCUIAutomation/XCUIElement/debugDescription",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "XCUIAutomation"
    ],
    "preciseIdentifier" : "c:objc(cs)XCUIElement(py)debugDescription"
  },
  "title" : "debugDescription"
}
-->

# debugDescription

Provides debugging information about the element.

```
var debugDescription: String { get }
```

## Discussion

The data in the string varies based on the time at which it’s captured, but it may include any of the following, as well as additional data:

- Values for the element’s attributes
- The entire tree of descendants rooted at the element
- The element’s query

Use this data for debugging only. Depending on any of the data as part of a test is unsupported.

---

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)