Since upgrading to Xcode 4 my app stops at what I think are non existent break points. When it breaks there is no breakpoint showing in the breakpoint navigator and the editor says:
Thread:1 Stopped at breakpoint 17
Anyone else seeing this? Is this something new, maybe?
See this post: Breakpoints not working in Xcode?. 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!
If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.
An exception breakpoint is a type of breakpoint that is created when some exception occurs in the code. On occurrence of such exception our application stops at that given condition causing the exception and we can access all variables in scope at that breakpoint.
Maybe it's an Xcode bug but I still have a solution.
You can use LLDB to see and manipulate all the actual breakpoints.
Just type the following commands in the lldb window:
(lldb) is the prompt.
(lldb) help -> for help
(lldb) help breakpoint -> for breakpoint subcommand's help
(lldb) breakpoint list -> list all the breakpoints.
(lldb) breakpoint delete -> Delete the specified breakpoint(s). If no breakpoints are
specified, delete them all.
(lldb) breakpoint delete 7.1 -> delete breanpoint 7.1
and, you can use this command to continue the program:
(lldb) c
user278859's answer is basically really a true answer, as this seems to be a bug in Xcode 4. I just had the same problem. I set a breakpoint at one place in a UIWebView delegate
's shoudlStartLoadWithRequest
-method (no other active breakpoints in the project) and the debugger stops in another method (in this case repeatedly webViewDidFinishLoad:
) of the same object.
So I'd say this is an Xcode bug. Found no way of fixing this btw., other than removing the above breakpoint ... Screenshot:
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