I have a xcode project which includes few cocoa pod files. When i put breakpoints in cocoa pod files, the debugger does not stops at those breakpoints, why? Could anyone have any idea about the same?.
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.
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. Click the breakpoint icon in the debug area toolbar to activate or deactivate all breakpoints.
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.
Right click to podfile and choose openwith xcode. Show activity on this post. Drag and drop it to TextEdit or open project in XCode and edit there.
I followed @UdaySingh's comment and it worked, I'm not sure why he didn't post an answer but I realize there are people who sometimes need a step by step and a visual guide tremendously helps. Here's the visual version of his comment.
In the project navigator select the blue project icon.
In Xcode 11.2.1 they switched the below photos to Project, it used to be under Target
Important. The pic below is from Project
in Xcode 11.2.1, this where you need to go:
Select Build Settings
.
The pic below is from Project
in Xcode 10.1, this is where you would need to go:
In the search field type Build Active Architecture
and make sure Debug
is set to Yes
In the same search field now type in Optimization Level
. Change Debug
and Release
to None
As per @matt’s comments below also do a clean afterwards.
That's it
In my case, cleaning Pods directory and installing pods again worked. Spent hours for this so hope it would be helpful for someone who couldn't find a solution yet.
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