Xcode 4 is fundamentally different from its predecessors but old errors sometimes revitalize. The orange breakpoint means that GDB can not resolve your symbols and that breakpoint will not be hit.
There is no change in setting breakpoints: open the source-code file and click in the gray gutter next to the spot where you want the debugger to stop. Look at the breakpoint-state button in the toolbar to see whether Xcode has indeed activated your breakpoints or not.
If the breakpoint is not triggered, try out these steps:
a must do checklist:
- be sure the ‘Active Device’ is properly set, ‘Active Configuration’ is set to Debug and the Target is correct, and
- you cleaned all targets and rebuilt your app, and
- Generate Debug Symbols is checked and Optimization Level is set to 0 in Build Settings.
When you debug a Device (iPhone or iPad) and cannot set breakpoints in Xcode 4:
- reboot the device,
- rebuild the app and
- run it again. The debugger will likely find the breakpoints now.
On the left Navigator pane there is now a Breakpoint Navigator where all the brekpoints are listed and managed.
In Xcode 4 a new breakpoint is local to the given workspace. If you add the project containing that breakpoint to another workspace, the breakpoint is not copied to the new one. Check it out.
In earlier Xcode version find Xcode -> Preferences -> Debugging tab. Uncheck Load symbols lazily if checked. It seems to be dropped from Xcode 4.
Notes:
- If you do not find these bits in Xcode 4, select the project file in the Project Navigator. Select the target you like to build. Then select Build Settings->All->Levels.