开发者

iOS: Debugging not working in XCode

I'm using XCode 4 and iOS SDK 4.3. My debugging worked fine but now i discovered that when setting a breakpoint, the app pauses but XCode doesn't focus on the line in the Editor. Also the green arrow is not displayed when hitting the break point. I have a UINavigationController which is allocated in the AppDelegate. When i set a breakpoint in the didFinishLaunchingWithOptions everything works as expected:

iOS: Debugging not working in XCode

This is when i a breakpoint has paused the app in the mapViewController which is the first it开发者_如何学Goem added to the navigation controller. (No green arrow but app is paused):

iOS: Debugging not working in XCode

I really have no clue why debugging is working in AppDelegate but not in this controller. If you need additional info or screenshots in order to help me, please tell me.

UPDATE:

Now it's even not working in AppDelegate and changed nothing. I can also step through the lines and can see that values are assigned in the Locals and can therefore guess where the app is currently in the code. So obviously everything works, just the currently executed line is not marked as it should.


In xCode4:

  • Your Project Name -> Edit Scheme
  • Info tab (in run configuration)
  • Set Build Configuration to "Debug", Debugger - to "LLDB" ("GDB" was before)
  • Run your project

Worked for me. For "LLDB" green line is visible. Switching back to "GDB" brings me to this issue again.


I have the same problem. XCode 4 just stops debugging but it doesn't display any errors. When I opened the SYSTEM console, I found this:

3/26/11 4:04:13 PM  Xcode[214]  [MT] Warning in /SourceCache/IDEDebugger/IDEDebugger-208/PlugIns/DebuggerGDB/DevToolsIDE/GDBMIDebuggingPlugin/GDBMI_Adaptor/PBXGDB_StackSequences.m:556
Details:  An unexpected error when executing stack-list-frames-lite : Previous frame inner to this frame (gdb could not unwind past this frame). Please attach your gdb log to your bug report.
Object:   <PBXGDB_UpdateStackSequence: 0x202a57b40>
Method:   -handleErrorForMICommand:
Thread:   <NSThread: 0x200020700>{name = (null), num = 1}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.

I have had this problem since XCode 3.2 and I have tried every solution I could find for it, but I have never been able to resolve it. At least XCode 3.2 told me the error. XCode 4 just stops working.

Update: sorry forgot the answer part. Several people have solved this problem by switching their compiler to GCC for the project AND ALL projects that it is linked to. Others have deleted their symbol file for their device version and XCode re-downloaded them and it started working. Niether work for me, but hopefully one will work for you.


Try changing the compiler: "GCC_VERSION = com.apple.compilers.llvmgcc42" to "GCC_VERSION = com.apple.compilers.llvm.clang.1_0"

Then compile and run again

Greetings

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜