On my Sierra 10.3.6 and Xcode 9.2, the Xcode playground will get stuck even for very simple programs. There seem to be may solutions if you search it. In my case, because the user is restricted by Parental Controls, I need to add it to the “Developer Tools” group when logged as an administrator, which solves the running stuck problem:

sudo dscl . append /Groups/_developer GroupMembership  YOUR_USERNAME