[swift-users] #if DEBUG on Linux

Taylor Swift kelvin13ma at gmail.com
Sun Aug 20 21:43:52 CDT 2017


#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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170820/2c8ec225/attachment.html>


More information about the swift-users mailing list