It always says "running myplayground" in the top bar with a little wheel spinning promisingly beside it, but it can continue like this for a long time. Can someone teach me how to fix it? Thank you very much.
why does my Xcode always get stuck at running a simple playground?
Hi Shizhuoo, did you end up resolving the issue? I'm having the same problem.
thanks
Can you copy the content of the playground ? You probably have an error that prevents from executing.
Very common problem going from Xcode 8 to Xcode 9. So far I'm quiting Xcode and launching it again whenever it gets stuck.
Do you have an iCloud Drive storage plan? If you do, that's the problem. The fact that your entire computer is syncing constantly to iCloud (including your Documents and Desktop folders), coupled with the fact that Xcode saves your files every few seconds, slows things down and even leads to "not responding" errors.
What you can do is go to your home folder (command+shift+h), create a "Local Files" folder that doesn't sync to iCloud, and keep your Xcode Projects and Playgrounds there instead. It'll be much snappier that way.
I was experiencing this problem too. While I didn't have iCloud running i do have Timemachine backups on. I created a directory called "~/scratch" and went into Timemachine Preferences, clicked the Options button and excluded the directory from backups.
This seems to be working for me.
Thanks @saphryn for getting me on the right track...
I got this answer from : Ioannis Diamantidis - How to fix Xcode Playground getting stuck on "Running". I am using Xcode version 13.2.1 with a Mac Mini M1. I went to the playground icon on the top right corner - Hide or show the Inspectors, it says Playground Settings , I select in Platform macOs. now my playground is running perfect, I see the results everywhere