I set a breakpoint in Xcode and run my app on a device. Xcode stops at the breakpoint and the console opens, but I just see a spinning wheel instead of a list of all the variables and Xcode sort of freezes. Nothing happens when I push the Stop button. It unfreezes only if I unplug the device. This just started happening last week.
Other times it will list the variables, but when I click the arrow next to "self" for example, the same "freeze" happens.
This does NOT happen while testing in the simulator.
Any ideas?
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!
Xcode tip #10: Breakpoints are great for debugging – place them by selecting a line number, or remove them by right-clicking and choosing Delete Breakpoint. You can also remove one by dragging it away, but a fast method is to use Cmd+\ to toggle a breakpoint on the current line.
Navigate to a line in your code where you want execution to pause, then click the gutter or line number in the source editor to set a breakpoint. Xcode displays a breakpoint icon to indicate the location. Drag a breakpoint up or down to move it to another location; drag it away from the gutter to remove it.
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.
Just restart your development machine. Worked for me.
This worked for me:
Close Xcode. Open Finder, hit ⌘+Shift+G to open "Go to Folder".
Type ~/Library/Developer/Xcode/DerivedData
Delete all folders in this directory and empty trash. Reopen Xcode and try again.
This is thanks to rokjarc (Why does Xcode successfully build & copy my application, but won't launch it?)
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