Reputation: 583
When I tried to run my app it could not launch on simulator or device, while throwing error.
Could not Launch "Carepilot" internal error
So I try Edit
sheme -> run -> info -> Debug executable
to make sure the Debug executable option is not checked, debug mode is disabled there, but this can't be debugged.
Anyone encountered same problem?
Upvotes: 1
Views: 993
Reputation: 5529
I had this exact same issue after an Xcode crash. Turns out that the executable no longer existed after the crash, but Xcode continued to access it since the reference still existed. Because of this, receiving this exact error is common when trying to debug the build.
If you click on the executable reference in the Products folder you can get the full path for the old build executable from the inspector on the right. Where is the name of your project, this path should be something like this:
/Users/username/Library/Developer/Xcode/DerivedData/<projectname>-<randomhash>/Build/Products/Debug/<projectname>
With the offending path in mind, you can open a terminal, change to the DerivedData folder, and remove the build folder.
$ cd ~/Library/Developer/Xcode/DerivedData
$ rm -r project-randomhash
After removing the build folder, re-build your project and debug once again.
Upvotes: 0
Reputation: 2475
I'm not sure exactly why you're seeing that, but here are some basic debugging steps to try.
First, turn debugging back on, you'll want that. Any solution that doesn't let you debug is useless.
Second, quit Xcode and and quit the Simulator. Sometimes things get in a funky state. Relaunch Xcode and try again.
If it still happens, reboot. Try again.
If it still happens, try it with a new project to rule out any issues with yours.
If it still happens, go to Xcode>Preferences…>Locations`, do you have Xcode 10.2 (10E125) command line tools installed and selected? That's what you should see.
If that's not it, go to the Terminal and enter xcode-select -p
. Does the path displayed point to the Contents/Developer
directory under your Xcode app? If not, set that using sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
(substituting your Xcode app's name if necessary).
Unfortunately, "internal errors" in Xcode occur for various reasons and don't provide any useful information. If all else fails, you may need to try reinstalling.
Upvotes: 2