Hi, I had the same issue, and all I did was save the file I was working with before actually running the code. This worked for me. I'm using an M1 Mac with VS code. Hope this helps.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: