# DebugDescription macro and “String interpolation” warning

**URL:** <https://forums.swift.org/t/debugdescription-macro-and-string-interpolation-warning/77269>\
**Category:** Using Swift\
**Tags:** debugging, compiler-warning\
**Created:** [January 17, 2025, 6:14pm UTC](https://forums.swift.org/t/debugdescription-macro-and-string-interpolation-warning/77269 "2025-01-17T18:14:30Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Jason-Abbott](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jason-abbott/32/27680_2.png) [@Jason-Abbott](https://forums.swift.org/u/Jason-Abbott)\
**Post date:** [January 17, 2025, 6:14pm UTC](https://forums.swift.org/t/debugdescription-macro-and-string-interpolation-warning/77269/1 "2025-01-17T18:14:30Z")

</div>

I have a long list of “⚠ String interpolation produces a debug description for an optional value” build warnings caused by use of the [DebugDescription](https://forums.swift.org/t/second-review-se-0440-debugdescription-macro/73325) macro like this

```swift
@DebugDescription
extension DateElement: CustomDebugStringConvertible {
    public var debugDescription: String {
        "[form: \(form), variable: \(variable), part: \(showParts)]"
    }
}

```

where `form` is optional.

Trying to fix with `\(String(describing: form))` or `\(form ?? “”)` causes the DebugDescription error, “🛑 Only references to stored properties are allowed.”

Is there a trick to reconcile these?

---

_[View the full topic](https://forums.swift.org/t/debugdescription-macro-and-string-interpolation-warning/77269)._
