<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><a href="https://stackoverflow.com/questions/24003291/ifdef-replacement-in-the-swift-language">https://stackoverflow.com/questions/24003291/ifdef-replacement-in-the-swift-language</a><br><br></div><div><div>see the duscussion </div><div id="AppleMailSignature"><br></div>Taylor Swift via swift-users <<a href="mailto:swift-users@swift.org">swift-users@swift.org</a>> <br></div><blockquote type="cite"><div><div dir="ltr"><div><div><span style="font-family:monospace,monospace">#if DEBUG<br> print("debug")<br>#endif</span><br><br></div>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?<br><br></div>I know about `<span style="font-family:monospace,monospace">_isDebugAssertConfiguration()</span>` but using it produces warnings when building in release mode.<br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-users mailing list</span><br><span><a href="mailto:swift-users@swift.org">swift-users@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-users">https://lists.swift.org/mailman/listinfo/swift-users</a></span><br></div></blockquote></body></html>