<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div>Full disclaimer: I haven’t looked into this bug, so I’m just going to describe higher-level workflow tips.</div><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 11, 2017, at 5:02 AM, Mike Choi via swift-dev <<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<title class=""></title>
<div class="">
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;" class="">Hello Swift community,
<div class=""><br class=""></div>
<div class="">I’m currently trying to debug SR-5556 <a href="https://bugs.swift.org/plugins/servlet/mobile#issue/SR-5556" class="">https://bugs.swift.org/plugins/servlet/mobile#issue/SR-5556</a>. </div>
<div class="">TL;Dr This bug has to do with Xcode not providing a fixit when it should. </div>
<div class=""><br class=""></div></div></div></div></blockquote><div><br class=""></div><div>The way to do what you’re asking for is to build a toolchain, which is far too time-consuming for the debugging workflow you want here. This diagnostic is coming from somewhere in Semantic Analysis, so you just need to take your minimally-reproducing test case and only run the compiler up to that point. To do this in Xcode, since you already have the project in hand, you can do the following:</div><div><br class=""></div><div>- Select the ‘swift’ scheme</div><div>- Pull up the scheme editor (⌘+⇧+<)</div><div>- Select the ‘Arguments’ tab and click the ‘+’</div><div>- (For this particular case) add ‘-frontend -typecheck /Path/To/This/Test/Case.swift’</div><div>- Close the scheme editor</div><div>- Build and run</div><div><br class=""></div><div>~Robert Widmann</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;" class="">
<div class="">To proceed, I built Swift and generated an Xcode project but have no idea how to debug the problem. Is there a way for me to input Swift code into the built Swift compiler via Xcode and debug in Xcode??</div>
<div class=""><br class=""></div>
<div class="">If not, what is the usual way to debug something like this?</div>
<div class=""><br class=""></div>
<div class="">Thank you for your time!</div>
</div>
<div name="messageSignatureSection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;" class=""><br class="">
Best,
<div class="">Mike JS. Choi</div>
</div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;" class=""><br class="">
<br class="">
<div class=""></div>
</div>
</div>
_______________________________________________<br class="">swift-dev mailing list<br class=""><a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-dev<br class=""></div></blockquote></div><br class=""></body></html>