#if DEBUG on Linux

#if DEBUG
    print("debug")
#endif

Doesn’t work on Linux, I think only XCode sets this. How can I
conditionally include code that only runs in debug mode on Linux?

I know about `_isDebugAssertConfiguration()` but using it produces warnings
when building in release mode.

see the duscussion

···

Taylor Swift via swift-users <swift-users@swift.org>
#if DEBUG
    print("debug")
#endif

Doesn’t work on Linux, I think only XCode sets this. How can I conditionally include code that only runs in debug mode on Linux?

I know about `_isDebugAssertConfiguration()` but using it produces warnings when building in release mode.
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users