Reputation: 5230
I have some weird problem with Xcode since I upgraded my Xcode to 5 from 4.6. When I set the breakpoint in a file, the program actually stops at the breakpoint, but I can't see my code in the workspace. It loads some other system codes like
0x2ff8: calll 0x2ffd -[ViewController viewDidLoad] + 13 at ViewController.m:28
0x2ffd: popl %eax
0x2ffe: movl 12(%ebp), %ecx
0x3001: movl 8(%ebp), %edx
0x3004: movl %edx, -12(%ebp)
0x3007: movl %ecx, -16(%ebp)
0x300a: movl 18799(%eax), %ecx
0x3010: movl 18559(%eax), %edx
When I click the continue button it shows my code again. I have tried,
None of these helped me. I have seen a lot of questions in StackOverflow which discuss "Breakpoints not working...", but for me the breakpoints are working, just not stopping in the correct position.
Upvotes: 6
Views: 11559
Reputation: 5230
I found the problem, Somehow the "Show Disassembly when debugging" was enabled in my Xcode which creates that problem. When I disabled it, all my debugger stopped in my source code.
You can find it under Product->Debug Workflow->Show Disassembly when debugging
Edit
In the latest Xcode it is under Debug->Debug Workflow->Show Disassembly when debugging
Upvotes: 18
Reputation: 9505
Xcode 6:
Go to Build Settings and make sure your "Strip style" is set up as "Non-Global Symbols" and not as "All Symbols"
Upvotes: 4