Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Breakpoints are not working in xcode pod files

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?.

like image 490
Uday Singh Avatar asked Apr 04 '16 09:04

Uday Singh


People also ask

Why breakpoint is 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! 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.

How do I enable breakpoints in Xcode?

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.

What is exception breakpoint in Xcode?

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.

How do I edit a pod in Xcode?

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.


2 Answers

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.

enter image description here

In Xcode 11.2.1 they switched the below photos to Project, it used to be under Target

enter image description here

Important. The pic below is from Project in Xcode 11.2.1, this where you need to go:

enter image description here

Select Build Settings.

The pic below is from Project in Xcode 10.1, this is where you would need to go:

enter image description here

In the search field type Build Active Architecture and make sure Debug is set to Yes

enter image description here

In the same search field now type in Optimization Level. Change Debug and Release to None

enter image description here

As per @matt’s comments below also do a clean afterwards.

That's it

like image 76
Lance Samaria Avatar answered Oct 12 '22 14:10

Lance Samaria


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.

like image 25
Pei Avatar answered Oct 12 '22 15:10

Pei