You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Xcode error: failed to attach to process ID xxx

I'm working on an Xcode project running on Xcode 4.4.1 and Mountain Lion OSX 10.8.1, trying to get it to run on iPhone Simulator 5.1. Initially everything worked fine (I could build and run it on the simulator), but somehow, something went wrong and now everytime I try to run the project, I get, "error: failed to attach to process ID xxx", where xxx is the current process ID (and hence varies at each run). I've tried the following:


1. Uninstalling Xcode and reinstalling a fresh (and latest) copy.

2. Reformatting my MacBook and reinstalling the updated Mountain Lion.

3. Clicking on Product -> Clean in Xcode.

4. Deleting derived data in the Organizer pane, under the Projects tab.

5. Resetting content in the iPhone Simulator.

6. Deleting everything under ~/Library/Application Support/iPhone Simulator.

7. Restarting my MacBook several times.

8. Creating a whole new project without adding any components.


NONE of these worked for me. I'm still unable to run my project on the simulator and I've already wasted many many hours trying to fix it. Is this a bug in the latest updates? I've seen similar problems on stackoverflow, seems like no one has found a solution yet.


This is my last bid for an answer. I'm at my wits' end.

MacBook (13-inch Late 2009), OS X Mountain Lion (10.8.1), iPhone Simulator 5.1, Xcode 4.4.1

Posted on Sep 8, 2012 2:15 AM

Reply
13 replies

Sep 13, 2012 11:45 AM in response to luvelle

Yes, I still get the error. I am running xcode on the 2011 iMac i5, with mountain lion. However I works on my old 2006 white macbook running lion and xcode 4.3. Maybe it is something to do with using both versions of xcode on the same project. But I am only speculating. Where you able to fix it, somehow?


I hope the xcode update shipping with iOS 6 will help.

Nov 28, 2012 6:49 PM in response to luvelle

I had exactly the same problem: when using any current version of Xcode 4.xx and the LLDB debugger, plus any version of the Simulator, Xcode consistently crashed with 'failed to attach to process ..'. My only resolution was to switch to the GDB debugger. This was disappointing since I really wanted to try the new, robust LLDB in XCode 4.6-DP.


And then I remembered; I had changed my network/server host file at ...etc/hosts some time ago to accomodate several Apache2 server virtual hosts, i.e., I removed the line:


127.0.0.1 locahost


That was it. Removing that line, Xcode crashed on attaching to the Simulator with LLDB.

Restoring that line, XCode worked just fine with LLDB and the Simulator.


Anyway, this may not be your problem but it's worth exploring. As far as I'm concerned, it's a serious undocumented bug.

Xcode error: failed to attach to process ID xxx

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.