Xcode 4 hangs at "Attaching to (app name)" Xcode 4 hangs at "Attaching to (app name)" xcode xcode

Xcode 4 hangs at "Attaching to (app name)"


Fixed it!! Hopefully this helps some people avoid a very frustrating couple hours. I solved this by:

  1. Clicking on the project name in the left pane (at the very top). This will bring up a new menu to the right, something like the project/ target editors in XCode 3.
  2. Click on Build Settings up at the top.
  3. Under Packaging make sure your product name is the same for every build, and equal to whatever it says it's attaching to. Eg if XCode is Hanging at "Attaching to myLCBO" but your product name is "LCBO Finder" then it won't build. That was exactly my problem because I renamed my app half way through development.

Hope this helps!


Here was our fix:

In Project > Edit Schemes > Run.

Change the Debugger from GDB to None (directly above the green circle in the image above).


A tip I found at the Apple Developer Forums:

Go into your ProjectName.xcodeproj/ directory and delete anything named with your userid. Re-open the project in xcode and all that will get recreated and it should work. At least it did for me.

Another tip is to manually delete the build directory.

Yet another tip is to navigate to the Organizer (Shift ⇧ Command ⌘ 2 in xcode 4), select Projects, select you application in the left hand side and then the Delete...-button to the right of Derived Data.

And never forget the universally useful tip: restart your computer and try again.

Good luck!