So I downloaded Xcode 4.3.1 with the latest iOS SDK from the App Store and I’m not impressed at all. While Xcode 4.3.1 can run my old iOS apps in iOS Simulator without a problem, any new project created with this version of Xcode cannot be attached as a debug process to iOS Simulator at all. What does that mean? It means I have to wait endlessly for my apps to run on the simulator and at the end, they simply don’t run. I will end up with a black screen and the Xcode’s top bar keeps saying “Attaching to …” the app name…
Have you come across this problem?
Update 1 (Solution):
I managed to find the issue. The problem is with LLDB. LLDB is the default debugger which Xcode 4.3.1 chooses for every new iOS app. Once I changed my debugger from LLDB to GDB, I can run and debug my iOS apps on iOS Simulator. I hope this will be of help to those facing the same issue.
Hi how do you change the debug to GDB?
Thanks
Press Command+Shift+,
That is Command, and then Shift and then the <, button on your keyboard.
Or simply go to Help and then type Edit Scheme and click the item that says Edit Scheme.
Or again, you can go to the Product menu and find the Edit Scheme menu there.
While in Edit Scheme window, select the "Run" option on the left hand side of the screen and then on the right hand side, change the debugger from LLDB to GDB.
I hope this helps
You are awesome. Thank you.
Thank you. I’m hoping it helped you?
Thanks
You’re very welcome š
doesn’t work! xcode 4.3.2
This issue seems to have been fixed with Xcode 4.3.3 and Xcode 4.5 (Beta)
Nope, still there – I still have to use GDB
THANK YOU! I’ve been trying different things hoping to fix this, and switching to GDB was the only thing that made a difference. I’m on Xcode 4.5 and iOS 5 and 6.
I should have mentioned that I’m able to connect to the simulator using LLDB fine, it’s connecting to an actual iPad/iPhone that requires switching to GDB.
Nevermind, the problem still exists. Xcode just got confused during the switch to GDB and stopped showing the error for a few launches. No need to approve these comments.
Hi, I’m a newbie in iOS dev. I have too the “attach stuck problem”.
Is there a problem using GDB permanently instead of LLVM in xcode 4.5 to target iOS6 ? Why use LLVM and not GDB ?
Thanx.
Hey!! I am stuck with a black screen when I try to compile my app!! I then have to force quit Xcode and the Simulator!! Plz Help.
Are you seeing this issue in the new Xcode 5 with iOS 7 SDK? If yes, that’s a bug in the SDK and the simulator.
4.6.3 rgb not working on mine, still getting black screen
I had this problem with Xcode 4, I always worked switching the debugger from LLVM to GDB, and now with Xcode 5 the GDB debugger doesn’t exist anymore. :S
I have this problem with Xcode 5. I’m testing things out using Apples TicTacToe app (so built for ios 7 etc.) No matter what I try the debugger never attaches to the running app.. Anyone have any ideas?
Debugging with LLDB is required with Xcode 5. If you’ve always used GDB because LLDB wasn’t attaching then you should check this post: http://stackoverflow.com/questions/15174282/why-does-the-lldb-debugger-constantly-fail-to-attach This solved my issue.