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:
This is when i a breakpoint has paused the app in the mapViewController which is the first item added to the navigation controller. (No green arrow but app is paused):
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.
When you run an application in Xcode, the debugger is automatically started and attached to the process of the application. Click the Run button in the top left or press Command + R. From the moment the application is up and running, we can start inspecting the process and, if necessary, debug it.
You might be pushing "Run" instead of "Debug" in which case your program is not running with the help of gdb, in which case you cannot expect breakpoints to work! In Xcode 6.4, there is now only a Run button and whether it runs a debug configuration or not depends on the currently selected scheme settings.
To try to debug it, set your active scheme in Xcode to be AppName > iPhone 11 Pro Max. Then using the simulator alone (not Xcode) click on the AppName to let it run. Then go into Xcode and do Debug > Attach to process by PID. Then type in the name of your App, and click Attach.
In xCode4:
Worked for me. For "LLDB" green line is visible. Switching back to "GDB" brings me to this issue again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With