6

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

enter image description here

When I click the continue button it shows my code again. I have tried,

  • Creating a new project
  • Relaunching Xcode
  • Restarting the system
  • Re-installing Xcode

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.

shim
  • 9,289
  • 12
  • 69
  • 108
Ramaraj T
  • 5,184
  • 4
  • 35
  • 68

2 Answers2

18

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

shim
  • 9,289
  • 12
  • 69
  • 108
Ramaraj T
  • 5,184
  • 4
  • 35
  • 68
4

Xcode 6:

Go to Build Settings and make sure your "Strip style" is set up as "Non-Global Symbols" and not as "All Symbols"

enter image description here

Kappe
  • 9,217
  • 2
  • 29
  • 41