title: Xcode 4.2. gets stuck "Attaching to myapp" when running
body: <p>In xcode 4.2, sometimes when you're going to run your ios proj on simulator, the status windows says "Attaching to myapp", and just gets stuck there... until you cancel.
  Now, this has been asked before:
  <a href="https://stackoverflow.com/questions/5382968/xcode-4-hangs-at-attaching-to-app-name">XCode 4 hangs at &quot;Attaching to (app name)&quot;</a></p>
  
  <p>and surprisingly, besides the accepted answer on that thread, there are at least 10 other possible solutions others have been adding, all for the same issue, people says one of them worked while the others didn't...</p>
  
  <p><strong>please note</strong>, this is not a sequence of steps. each one is a possible solution:</p>
  
  <p><strong>1-</strong> restart xcode and/or restart simulator (reset content and settings) and/or restart computer.</p>
  
  <p><strong>2-</strong> click on project name in project navigator. in build settings tab, go to packaging and make sure that "Product Name" is the same that the one xcode says simulator is attaching to when running. if they are different, it will fail.</p>
  
  <p><strong>3-</strong> go to your projectname.xcodeproj folder. inside there delete anything named with your userid. when you reopen xcode those files will be recreated and it should work…</p>
  
  <p><strong>4-</strong> Manually delete the build directory for your project.</p>
  
  <p><strong>5-</strong> Go to organizer window. select Projects, select your app in the left hand side and then delete over "Derived Data"</p>
  
  <p><strong>6-</strong> Check Launch option is set to "Automatically" in Product->Edit Scheme, "Run" scheme.</p>
  
  <p><strong>7-</strong> In Project->"Edit Schemes"->Run. Change the Debugger from GDB to None (this doesn't make sense to me..).</p>
  
  <p><strong>8-</strong> Kill the process gdb-i386-apple-darwin from Activity Monitor. this is assuming gdb is not responding.</p>
  
  <p><strong>9-</strong> In "Product"->Edit Scheme. in Run, click yourappname.app, choose other, navigate to your .app in your project. now run.</p>
  
  <p><strong>10-</strong> Check that you don't have two different Info.plist in your project. if you do, remove the bad one.</p>
  
  <hr>
  
  <p>In my case, none of them do the job. My project builds succesfully, everything seems fine, .plist, bundle identifier, name, etc.. and still can't pass the "attaching" part. i don't understand the reason of this, so any suggestions to fix it and possibly understand the problem i'll really appreciate it.</p>